/* ============================================================
   KROSMASTER COMPAGNON — style.css
   Palette : émeraude profond, mousse, or Gobball, papier clair.
   Mobile-first : tout est pensé pour le téléphone d'abord.
   ============================================================ */

:root {
  --emerald: #14503C;      /* vert émeraude profond (structure)   */
  --moss: #2E7D5B;         /* vert mousse (actions)               */
  --gold: #DFA33B;         /* or Gobball (accent, niveaux)        */
  --gold-soft: #F4E3C0;
  --paper: #F4F6EE;        /* fond papier légèrement vert         */
  --card: #FFFFFF;
  --ink: #1E2A22;          /* texte principal                     */
  --ink-soft: #5C6B60;     /* texte secondaire                    */
  --line: #DCE3D6;
  --danger: #B4442E;
  --radius: 14px;
  --shadow: 0 2px 10px rgba(20, 80, 60, 0.10);
  --font-display: "Fredoka", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .brand-name, .stat-gem b, .level-shield {
  font-family: var(--font-display);
  letter-spacing: 0.01em;
}

h1 { font-size: 1.5rem; margin: 0 0 4px; color: var(--emerald); }
h2 { font-size: 1.15rem; margin: 24px 0 10px; color: var(--emerald); }
p { margin: 0 0 12px; }
a { color: var(--moss); }
img { max-width: 100%; }

/* ---------- Barre du haut ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  padding-top: calc(10px + env(safe-area-inset-top));
  background: var(--emerald);
  color: #fff;
}
.brand { display: flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; }
.brand-die {
  width: 32px; height: 32px; border-radius: 8px;
  object-fit: cover; display: block; flex: 0 0 auto;
}
.brand-name { font-weight: 600; font-size: 1.05rem; }
.brand-name em { font-style: normal; color: var(--gold); font-weight: 500; }
.topbar-user { font-size: 0.85rem; display: flex; align-items: center; gap: 8px; }
.topbar-user a { color: var(--gold-soft); text-decoration: none; font-weight: 600; }

/* ---------- Zone principale ---------- */
.view {
  max-width: 860px;
  margin: 0 auto;
  padding: 16px 16px 96px; /* place pour la barre d'onglets */
}
.loading { text-align: center; color: var(--ink-soft); padding: 48px 0; }
.page-intro { color: var(--ink-soft); font-size: 0.95rem; margin-bottom: 16px; }

/* ---------- Barre d'onglets (bas d'écran) ---------- */
.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 30;
  display: flex;
  background: var(--card);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar a {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 10px 2px 8px;
  min-height: 52px;
  font-size: 0.68rem; font-weight: 600;
  color: var(--ink-soft); text-decoration: none;
}
.tabbar a .tab-ico { font-size: 1.15rem; line-height: 1; }
.tab-ico-img { width: 22px; height: 22px; object-fit: contain; display: block; }
.tabbar a.active { color: var(--emerald); }
.tabbar a.active .tab-ico { filter: none; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: 600 0.95rem var(--font-body);
  padding: 10px 16px;
  border: none; border-radius: 999px;
  background: var(--moss); color: #fff;
  cursor: pointer;
  transition: transform 0.06s ease, background 0.15s ease;
}
.btn:active { transform: scale(0.97); }
.btn.gold { background: var(--gold); color: #3A2B0D; }
.btn.ghost { background: transparent; color: var(--moss); border: 1.5px solid var(--moss); }
.btn.danger { background: var(--danger); }
.btn.small { padding: 9px 14px; font-size: 0.85rem; min-height: 38px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }

/* ---------- Filtres / recherche ---------- */
.filters {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 16px;
}
.filters input[type="search"] {
  flex: 1 1 100%;
}
input, select, textarea {
  font: 400 1rem var(--font-body);
  color: var(--ink);
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  width: 100%;
}
.filters select { flex: 1 1 30%; width: auto; min-width: 110px; }
input:focus-visible, select:focus-visible, textarea:focus-visible, .btn:focus-visible, a:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 1px;
}
label { font-size: 0.85rem; font-weight: 600; color: var(--ink-soft); display: block; margin: 12px 0 4px; }

/* ---------- Grille de cartes ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}
.card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  cursor: pointer;
  display: flex; flex-direction: column;
}
.card-img {
  aspect-ratio: 1 / 1;
  background: linear-gradient(150deg, #E6EEDF, #CFE0D2);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.2rem; color: var(--emerald);
  object-fit: cover; width: 100%;
}
img.card-img { object-fit: contain; background: #fff; }
.card-body { padding: 8px 10px 10px; }
.card.not-owned { filter: grayscale(0.9); opacity: 0.6; }
.card.not-owned:hover, .card.not-owned:active { filter: grayscale(0.4); opacity: 0.85; }
.card-name { font-weight: 700; font-size: 0.92rem; line-height: 1.25; }
.card-sub { font-size: 0.75rem; color: var(--ink-soft); }

/* Écusson de niveau — la signature visuelle du site */
.level-shield {
  position: absolute; top: 6px; left: 6px;
  min-width: 30px; height: 34px;
  padding: 0 4px;
  display: flex; align-items: center; justify-content: center;
  background: var(--gold);
  color: #3A2B0D;
  font-size: 1.05rem; font-weight: 700;
  clip-path: polygon(0 0, 100% 0, 100% 70%, 50% 100%, 0 70%);
}

/* Pastilles de rareté */
.rarity {
  display: inline-block;
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
  border-radius: 999px; padding: 2px 8px;
  background: #E8ECE3; color: var(--ink-soft);
}
.rarity.rare { background: #DCE9FA; color: #2B5AA0; }
.rarity.peu { background: #DFF0E2; color: #2E7D5B; }
.rarity.krosmique { background: #F3E2F7; color: #7B3597; }
.rarity.communautaire { background: var(--gold-soft); color: #8A6215; }

/* Couleur du nom des figurines (blanc / noir / or) — visible partout */
.name-chip { display: inline-block; padding: 0 6px; border-radius: 6px; }
.name-chip.name-blanc { background: #FFFFFF; border: 1.5px solid #C9CFC4; color: var(--ink); }
.name-chip.name-noir { background: #1E2A22; color: #FFFFFF; }
.name-chip.name-or { background: linear-gradient(120deg, #F0C97A, #DFA33B); color: #3A2B0D; }

/* Filtre avec bouton d'information (i) */
.filter-info { display: inline-flex; align-items: center; gap: 4px; flex: 1 1 30%; min-width: 130px; }
.filter-info select { flex: 1; min-width: 0; }
.info-btn {
  flex: 0 0 auto;
  width: 38px; height: 38px; border-radius: 50%;
  border: none; background: var(--emerald); color: var(--gold);
  font: 700 1rem var(--font-display); font-style: italic;
  cursor: pointer;
}

/* Gemmes de statistiques (fiche détaillée) */
.stat-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.stat-gem {
  flex: 1; min-width: 60px;
  text-align: center;
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 8px 4px;
}
.stat-gem b { display: block; font-size: 1.3rem; color: var(--emerald); }
.stat-gem span { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; color: var(--ink-soft); }

/* ---------- Fiche détaillée / modale ---------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(20, 40, 30, 0.55);
  display: flex; align-items: flex-end; justify-content: center;
}
.modal {
  background: var(--paper);
  width: 100%; max-width: 560px;
  max-height: 92vh; overflow-y: auto;
  border-radius: 20px 20px 0 0;
  padding: 20px 18px calc(20px + env(safe-area-inset-bottom));
  animation: slide-up 0.22s ease;
}
@keyframes slide-up { from { transform: translateY(40px); opacity: 0.4; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .modal { animation: none; }
  .btn { transition: none; }
}
.modal-close {
  float: right; background: none; border: none; color: var(--ink-soft); cursor: pointer;
  font-size: 1.8rem; line-height: 1; width: 44px; height: 44px; margin: -8px -8px 0 0;
  display: flex; align-items: center; justify-content: center;
}
.detail-img { width: 100%; object-fit: contain; border-radius: var(--radius); background: #fff; display: block; }
/* En-tête toujours affiché en premier (nom, badges) avant l'image */
.detail-top { margin-bottom: 10px; }
.detail-top h1 { margin-bottom: 4px; }
/* Loupe visible superposée sur la carte : rend le "toucher pour agrandir" évident */
.img-zoom-wrap { position: relative; }
.zoom-badge {
  position: absolute; bottom: 8px; right: 8px;
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(30, 42, 34, 0.72); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; pointer-events: none;
}
/* Fiche en 2 colonnes : texte à gauche, carte à droite (empilé sur mobile, image d'abord) */
.detail-layout { display: flex; flex-direction: column-reverse; gap: 12px; }
.detail-main { min-width: 0; }
.detail-side { flex: 0 0 auto; }
/* Sur mobile, la carte ne doit pas dominer tout l'écran : hauteur plafonnée, on peut zoomer pour la voir en entier */
@media (max-width: 559px) {
  .detail-side .detail-img { max-height: 42vh; }
}
.zoomable { cursor: zoom-in; }
.zoom-overlay {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(15, 30, 22, 0.92);
  display: flex; align-items: center; justify-content: center;
  cursor: zoom-out; padding: 12px;
}
.zoom-overlay img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; }
@media (min-width: 560px) {
  .detail-layout { flex-direction: row; align-items: flex-start; }
  .detail-main { flex: 1; }
  .detail-side { width: 44%; max-width: 300px; position: sticky; top: 0; }
}
.detail-noimg {
  min-height: 160px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: linear-gradient(150deg, #E6EEDF, #CFE0D2);
  color: var(--emerald); font-family: var(--font-display); font-weight: 600;
  text-align: center; gap: 4px;
}
.detail-noimg small { font: 400 0.78rem var(--font-body); color: var(--ink-soft); }
.mini-h3 { font: 600 0.85rem var(--font-body); color: var(--emerald); margin: 10px 0 4px; text-transform: uppercase; letter-spacing: 0.03em; }

/* Duo de vignettes (figurines double profil) */
.vignettes-duo { display: flex; gap: 10px; margin-top: 10px; }
.vignettes-duo > div { flex: 1; text-align: center; }
.mini-vignette {
  width: 100%; aspect-ratio: 1/1; object-fit: contain;
  background: #fff; border: 1px solid var(--line); border-radius: 8px;
}
.vignettes-duo span { display: block; font-size: 0.7rem; color: var(--ink-soft); margin-top: 2px; }
.flavor { font-style: italic; color: var(--ink-soft); border-left: 3px solid var(--gold); padding-left: 10px; margin: 12px 0; }
.powers { white-space: pre-line; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; font-size: 0.92rem; }

/* ---------- Quantité (+ / -) ---------- */
.qty {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--card); border: 1.5px solid var(--line); border-radius: 999px;
  padding: 4px 6px;
}
.qty button {
  width: 40px; height: 40px; border-radius: 50%;
  border: none; background: var(--emerald); color: #fff;
  font-size: 1.2rem; font-weight: 700; cursor: pointer;
}
.qty button.minus { background: #E8ECE3; color: var(--ink); }
.qty b { min-width: 22px; text-align: center; font-size: 1.05rem; }

/* ---------- Statistiques de collection ---------- */
.statbox {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; margin-bottom: 12px; box-shadow: var(--shadow);
}
.statbox h3 { margin: 0 0 6px; font-size: 1rem; color: var(--emerald); }
.statbox.clickable { cursor: pointer; transition: transform 0.06s ease; }
.statbox.clickable:active { transform: scale(0.99); }
.statbox .chevron { float: right; color: var(--gold); font-size: 1.2rem; line-height: 1; }
.bar { height: 10px; border-radius: 999px; background: #E8ECE3; overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--moss), var(--gold)); }
.stat-line { display: flex; justify-content: space-between; font-size: 0.9rem; margin-bottom: 6px; }

/* ---------- Listes (équipes, ressources, admin) ---------- */
.list-item {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 14px; margin-bottom: 10px; box-shadow: var(--shadow);
}
.list-item h3 { margin: 0 0 2px; font-size: 1.02rem; }
.list-item .meta { font-size: 0.82rem; color: var(--ink-soft); }
.winrate { font-weight: 700; color: var(--emerald); }

/* Ordre d'initiative dans le créateur d'équipe */
.ordre-row {
  display: flex; align-items: center; gap: 10px;
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  padding: 6px 10px; margin-bottom: 6px;
}
.ordre-row.tie { border-color: var(--gold); background: var(--gold-soft); }
.ordre-pos {
  font-family: var(--font-display); color: var(--emerald);
  min-width: 22px; text-align: center;
}
.ordre-row .pname { flex: 1; min-width: 0; font-weight: 600; font-size: 0.9rem; }
.ordre-btns { display: flex; gap: 4px; }
.ordre-btns button {
  width: 42px; height: 42px; border-radius: 8px; border: none;
  background: var(--emerald); color: var(--gold); font-size: 1rem; cursor: pointer;
}
.ordre-btns button:disabled { background: #E8ECE3; color: #B7C0B4; cursor: default; }

/* Récapitulatif de l'équipe en cours (créateur d'équipe) */
.team-selected {
  display: flex; flex-wrap: wrap; gap: 6px;
  background: var(--gold-soft);
  border: 1.5px dashed var(--gold);
  border-radius: var(--radius);
  padding: 10px; margin-bottom: 10px;
  min-height: 44px; align-items: center;
}
.team-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--card); border: 1.5px solid var(--line);
  border-radius: 999px; padding: 4px 10px;
  font: 600 0.82rem var(--font-body); color: var(--ink);
  cursor: pointer;
}
.team-chip b { color: var(--emerald); font-weight: 700; }
.team-chip:active { transform: scale(0.97); }

/* Sélection d'équipe */
.picker { max-height: 300px; overflow-y: auto; border: 1.5px solid var(--line); border-radius: var(--radius); background: var(--card); }
.picker-row {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 12px; border-bottom: 1px solid var(--line);
}
.picker-row:last-child { border-bottom: none; }
.picker-row.selected { background: var(--gold-soft); }
.picker-row .pname { font-weight: 600; font-size: 0.92rem; }

/* Ligne de choix de profil pour les figurines double face */
.picker-row-double { flex-direction: column; align-items: stretch; gap: 8px; }
.prow-head { display: flex; align-items: center; gap: 8px; width: 100%; }
.prow-head .pname { flex: 1; min-width: 0; }
.prow-head .minus {
  width: 40px; height: 40px; border-radius: 50%; border: none; flex: 0 0 auto;
  background: #E8ECE3; color: var(--ink); font-size: 1.2rem; font-weight: 700; cursor: pointer;
}
.prow-head .minus:disabled { opacity: 0.4; cursor: default; }
.prow-profiles { display: flex; gap: 8px; width: 100%; }
.profile-btn {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  background: var(--card); border: 1.5px solid var(--moss); border-radius: 10px;
  padding: 8px 6px; cursor: pointer; min-height: 52px;
}
.profile-btn .pb-label { font-size: 0.76rem; font-weight: 700; color: var(--emerald); line-height: 1.15; text-align: center; }
.profile-btn .pb-level { font-size: 0.82rem; font-weight: 600; color: var(--ink); }
.profile-btn:disabled { border-color: var(--line); opacity: 0.5; cursor: default; }
.profile-btn:disabled .pb-label { color: var(--ink-soft); }
.profile-btn:active:not(:disabled) { transform: scale(0.97); }
@media (max-width: 420px) {
  .prow-profiles { flex-direction: column; }
}
.team-total {
  position: sticky; bottom: 0;
  background: var(--emerald); color: #fff;
  border-radius: var(--radius);
  padding: 10px 14px; margin-top: 10px;
  display: flex; justify-content: space-between; align-items: center;
  font-weight: 600;
}
.team-total.over { background: var(--danger); }

/* ---------- Export PNG (zone capturée) ---------- */
.export-sheet {
  background: var(--paper);
  border: 3px solid var(--emerald);
  border-radius: var(--radius);
  padding: 16px;
}
.export-sheet h2 { margin-top: 0; }

/* ---------- Formulaires admin & compte ---------- */
.form-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; margin-bottom: 16px; box-shadow: var(--shadow);
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.form-grid .full { grid-column: 1 / -1; }
.hint { font-size: 0.8rem; color: var(--ink-soft); margin-top: 4px; margin-bottom: 8px; }

/* Ligne "Ma collection" sur la fiche : sépare bien le compteur normal de la variante */
.coll-line {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius);
  padding: 10px 12px; margin-bottom: 8px;
}
.coll-line-label { font-size: 0.85rem; font-weight: 600; color: var(--ink); }
.coll-line-label small { display: block; font-weight: 400; color: var(--ink-soft); margin-top: 2px; }
.coll-line-variante { border-color: var(--gold); background: var(--gold-soft); }

/* Admin : gestion des icônes d'onglets */
.icon-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--line);
}
.icon-row:last-of-type { border-bottom: none; }
.icon-preview {
  width: 44px; height: 44px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; background: var(--paper); border: 1.5px solid var(--line); border-radius: 10px;
}
.icon-preview img { width: 32px; height: 32px; object-fit: contain; }
.error-text { color: var(--danger); font-weight: 600; font-size: 0.9rem; }

/* ---------- Mode match ---------- */
.counters { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.counter-box {
  flex: 1; min-width: 150px;
  background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius);
  padding: 8px 10px; display: flex; flex-direction: column; gap: 6px;
}
.counter-box.camp-moi { border-color: var(--moss); }
.counter-box > b { font-family: var(--font-display); color: var(--emerald); }
.marker-ctl {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.85rem; font-weight: 600;
}
.marker-ctl button {
  width: 30px; height: 30px; border-radius: 50%; border: none;
  background: #E8ECE3; color: var(--ink); font-size: 1rem; font-weight: 700; cursor: pointer;
}
.marker-ctl b { min-width: 20px; text-align: center; }

.match-fig {
  background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--moss);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 10px 12px; margin-bottom: 8px;
}
.match-fig.ko { opacity: 0.55; filter: grayscale(0.7); }
.match-card {
  width: 100%; max-height: 430px; object-fit: contain;
  background: #fff; border-radius: 10px; border: 1px solid var(--line);
  cursor: zoom-in; margin-bottom: 8px; display: block;
}
.match-head { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.match-thumb {
  width: 46px; height: 46px; object-fit: contain; background: #fff; border-radius: 8px;
  border: 1px solid var(--line); flex: 0 0 auto; cursor: zoom-in;
}
.match-id { flex: 1; min-width: 0; }
.match-id .meta { display: block; font-size: 0.75rem; color: var(--ink-soft); }
.markers { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 2px; }
.marker {
  font-size: 0.68rem; font-weight: 700; border-radius: 999px; padding: 1px 7px;
}
.marker.boost { background: #DFF0E2; color: #2E7D5B; }
.marker.entrave { background: #F8E3DE; color: var(--danger); }
.match-pv { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.match-pv b { font-family: var(--font-display); font-size: 1.5rem; color: var(--emerald); min-width: 30px; text-align: center; }
.match-pv b.danger-pv { color: var(--danger); }
.match-pv small { color: var(--ink-soft); }
.pvbtn {
  width: 40px; height: 40px; border-radius: 50%; border: none;
  background: var(--danger); color: #fff; font-size: 1.3rem; font-weight: 700; cursor: pointer;
}
.pvbtn.heal { background: var(--moss); }
.match-more {
  display: flex; gap: 12px; flex-wrap: wrap; align-items: center;
  border-top: 1px dashed var(--line); margin-top: 10px; padding-top: 10px;
}
.match-more .hint { flex-basis: 100%; margin: 0; }

/* Tablette & ordinateur : plusieurs cartes côte à côte dans la frise */
@media (min-width: 640px) {
  .counter-box { flex-direction: row; align-items: center; gap: 20px; }
  #frise {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 10px;
    align-items: start;
  }
  .match-fig { margin-bottom: 0; }
  .match-thumb { width: 60px; height: 60px; }
}
@media (min-width: 1100px) {
  .view:has(#frise) { max-width: 1200px; }
}

/* Menu d'actions secondaires (équipes, etc.) : boutons pleine largeur, faciles à toucher */
.menu-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.menu-actions .btn { width: 100%; justify-content: flex-start; padding: 14px 16px; font-size: 1rem; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: #fff;
  padding: 10px 18px; border-radius: 999px;
  font-size: 0.9rem; font-weight: 600;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 60; max-width: 90vw; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Écrans plus larges ---------- */
@media (min-width: 700px) {
  h1 { font-size: 1.9rem; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
  .modal { border-radius: 20px; align-self: center; max-width: 720px; }
  .modal-backdrop { align-items: center; }
  .filters select { flex: 0 1 auto; }
}
