/* Frishot — mobile-first, sans framework */
:root {
  --accent: #e8552f;
  --accent-fonce: #c94322;
  --ok: #1e9e6a;
  --info: #2b6cb0;
  --err: #c53030;
  --txt: #1c1c1e;
  --txt2: #6b6b70;
  --bg: #faf8f5;
  --carte: #ffffff;
  --bord: #e8e4dd;
  --r: 14px;
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg); color: var(--txt); font-size: 16px; line-height: 1.45;
}
#app { max-width: 560px; margin: 0 auto; min-height: 100%; display: flex; flex-direction: column; }

/* ---------- En-tête ---------- */
header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; position: sticky; top: 0; background: var(--bg); z-index: 5;
}
.logo { font-weight: 800; font-size: 22px; letter-spacing: -0.5px; }
.logo span { color: var(--accent); }
.pill {
  background: var(--carte); border: 1px solid var(--bord); border-radius: 999px;
  padding: 6px 14px; font-weight: 700; font-size: 14px;
}
.pill b { color: var(--accent); }

main { flex: 1; padding: 0 16px 96px; }

/* ---------- Navigation basse ---------- */
nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 10;
  background: var(--carte); border-top: 1px solid var(--bord);
  display: flex; justify-content: center; gap: 8px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
}
nav button {
  flex: 1; max-width: 260px; border: 0; background: none; font-size: 14px; font-weight: 600;
  color: var(--txt2); padding: 8px; border-radius: 10px; cursor: pointer;
}
nav button.actif { color: var(--accent); background: #fdeee9; }
nav button.principal {
  background: var(--accent); color: #fff; font-size: 15px; font-weight: 700;
}

/* ---------- Boutons & formulaires ---------- */
.btn {
  display: block; width: 100%; border: 0; border-radius: var(--r); cursor: pointer;
  background: var(--accent); color: #fff; font-size: 17px; font-weight: 700;
  padding: 15px; margin: 10px 0; text-align: center; text-decoration: none;
}
.btn:active { background: var(--accent-fonce); }
.btn.sec { background: var(--carte); color: var(--txt); border: 1.5px solid var(--bord); }
.btn.vert { background: var(--ok); }
.btn:disabled { opacity: 0.5; }
input[type=email], input[type=password] {
  width: 100%; padding: 14px; font-size: 16px; border: 1.5px solid var(--bord);
  border-radius: var(--r); margin: 6px 0; background: var(--carte);
}
.erreur { color: var(--err); font-size: 14px; margin: 8px 0; min-height: 18px; }
.note { color: var(--txt2); font-size: 13px; text-align: center; margin: 10px 0; }
.lien { color: var(--info); background: none; border: 0; font-size: 15px; cursor: pointer; text-decoration: underline; }

/* ---------- Cartes / liste d'articles ---------- */
.carte {
  background: var(--carte); border: 1px solid var(--bord); border-radius: var(--r);
  padding: 14px; margin: 10px 0;
}
.article-ligne { display: flex; gap: 12px; align-items: center; cursor: pointer; }
.article-ligne img {
  width: 64px; height: 64px; object-fit: cover; border-radius: 10px; background: #eee;
}
.article-ligne .vide {
  width: 64px; height: 64px; border-radius: 10px; background: #f0ede8;
  display: flex; align-items: center; justify-content: center; font-size: 24px;
}
.article-info { flex: 1; min-width: 0; }
.article-info .titre {
  font-weight: 600; font-size: 15px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.badge {
  display: inline-block; font-size: 12px; font-weight: 700; border-radius: 999px;
  padding: 3px 10px; margin-top: 4px;
}
.badge.brouillon { background: #efece7; color: var(--txt2); }
.badge.attente { background: #fef3e2; color: #b7651a; }
.badge.prete { background: #e3f5ec; color: var(--ok); }
.badge.publiee { background: #e5eefb; color: var(--info); }
.badge.erreur { background: #fde8e8; color: var(--err); }

/* ---------- Capture guidée ---------- */
.capture-tete { text-align: center; margin: 18px 0 6px; }
.capture-tete h2 { font-size: 20px; }
.capture-tete p { color: var(--txt2); font-size: 14px; }
.miniatures { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0; min-height: 68px; }
.miniatures img {
  width: 64px; height: 64px; object-fit: cover; border-radius: 10px;
  border: 2px solid var(--bord);
}
.bouton-photo {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 100%; height: 130px; border: 2.5px dashed var(--accent); border-radius: var(--r);
  background: #fdf3f0; color: var(--accent); font-weight: 700; font-size: 16px;
  cursor: pointer; margin: 8px 0;
}
.bouton-photo .ico { font-size: 34px; }

/* ---------- Écran de transfert ---------- */
.champ { margin: 12px 0; }
.champ .etiquette { font-size: 12px; font-weight: 700; color: var(--txt2); text-transform: uppercase; letter-spacing: 0.4px; }
.champ .valeur-ligne { display: flex; gap: 8px; align-items: flex-start; margin-top: 4px; }
.champ .valeur {
  flex: 1; background: var(--carte); border: 1px solid var(--bord); border-radius: 10px;
  padding: 10px 12px; font-size: 15px; word-break: break-word; white-space: pre-wrap;
  max-height: 180px; overflow-y: auto;
}
.copier {
  border: 0; border-radius: 10px; background: var(--txt); color: #fff;
  font-size: 13px; font-weight: 700; padding: 10px 14px; cursor: pointer; flex-shrink: 0;
}
.copier.ok { background: var(--ok); }
.photos-grille { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.photos-grille a img {
  width: 76px; height: 76px; object-fit: cover; border-radius: 10px; border: 1px solid var(--bord);
}
.selection { background: #f4f1ec; border-radius: 10px; padding: 10px 12px; font-size: 14px; margin-top: 4px; }
.retour { background: none; border: 0; color: var(--txt2); font-size: 15px; cursor: pointer; padding: 8px 0; }
.spinner {
  display: inline-block; width: 16px; height: 16px; border: 2.5px solid #f0c9ba;
  border-top-color: var(--accent); border-radius: 50%; animation: rot 0.8s linear infinite;
  vertical-align: -3px; margin-right: 6px;
}
@keyframes rot { to { transform: rotate(360deg); } }
.centre { text-align: center; }
h1.titre-page { font-size: 22px; margin: 14px 0 4px; }
.cache { display: none !important; }
