/* Mobile d'abord : gros boutons, une colonne, polices du système (rien de chargé ailleurs). */
:root {
  --fond: #fbfaf7;
  --texte: #1f1d1a;
  --discret: #6b665e;
  --accent: #1f5c4a;
  --accent-texte: #ffffff;
  --bord: #d9d4ca;
  --erreur: #9b1c1c;
  --ok: #1f5c4a;
}
@media (prefers-color-scheme: dark) {
  :root {
    --fond: #171614;
    --texte: #f1eee8;
    --discret: #a8a299;
    --accent: #5fb89a;
    --accent-texte: #0d1f19;
    --bord: #3a3732;
    --erreur: #f08a8a;
    --ok: #5fb89a;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--fond);
  color: var(--texte);
  font: 18px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}
main { max-width: 40rem; margin: 0 auto; padding: 16px; }
h1 { font-size: 1.5rem; margin: 0.5rem 0 1rem; }
h2 { font-size: 1.15rem; margin: 1.75rem 0 0.5rem; }
a { color: var(--accent); }

.haut {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 16px; border-bottom: 1px solid var(--bord);
}
.haut form { margin: 0; }

label { display: block; margin: 1rem 0 0.35rem; font-weight: 600; }
input[type="text"], input[type="password"], input[type="search"], textarea {
  width: 100%; padding: 14px; font: inherit; color: inherit; background: transparent;
  border: 1px solid var(--bord); border-radius: 10px;
}
textarea { resize: vertical; }

button, .bouton {
  display: inline-block; min-height: 48px; padding: 12px 20px; margin-top: 1rem;
  font: inherit; font-weight: 600; text-align: center; text-decoration: none; cursor: pointer;
  color: var(--accent); background: transparent; border: 2px solid var(--accent); border-radius: 12px;
}
.gros { display: block; width: 100%; min-height: 60px; font-size: 1.1rem; }
.principal { background: var(--accent); color: var(--accent-texte); }
button.lien { min-height: 44px; margin: 0; padding: 8px 0; border: 0; text-decoration: underline; font-weight: 400; }

/* Champ de fichier masqué à l'œil, mais toujours actif sous son étiquette. */
.cache { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
label.choisir { margin-top: 0.5rem; }

.phrase { font-size: 1.2rem; font-weight: 600; }
.discret { color: var(--discret); }
.message { padding: 12px; border-radius: 10px; border: 1px solid var(--bord); }
.message.erreur { color: var(--erreur); border-color: var(--erreur); }

.recherche { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.recherche label { width: 100%; }
.recherche input { flex: 1 1 12rem; }
.recherche button { margin-top: 0; }

.comptes, .liste-objets, .liste-photos, .historique { list-style: none; padding: 0; margin: 0; }
.comptes li { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--bord); }
.liste-objets li a {
  display: flex; flex-wrap: wrap; gap: 4px 12px; justify-content: space-between;
  padding: 14px 0; border-bottom: 1px solid var(--bord); text-decoration: none; color: inherit;
}
.statut { color: var(--discret); }
.statut-grand { font-weight: 700; color: var(--accent); }

.liste-photos li { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--bord); }
.liste-photos img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; }
.liste-photos li.recue span { color: var(--ok); }
.liste-photos li.coupee span, .liste-photos li.refusee span, .liste-photos li.panne span { color: var(--erreur); }
.liste-photos li.panne { cursor: pointer; min-height: 48px; }

.galerie { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.galerie img { width: 100%; height: auto; border-radius: 8px; }

.champs dt { font-weight: 600; margin-top: 0.75rem; }
.champs dd { margin: 0; }
.champs .texte { white-space: pre-wrap; }
.historique li { padding: 6px 0; border-bottom: 1px solid var(--bord); }

.liste-appareils, .journal, .liens-securite { list-style: none; padding: 0; margin: 0; }
.liste-appareils li, .journal li { padding: 12px 0; border-bottom: 1px solid var(--bord); }
.liste-appareils p, .journal p { margin: 0.25rem 0; overflow-wrap: anywhere; }
.liste-appareils form { margin: 0; }
.liens-securite li { padding: 10px 0; }
.cet-appareil {
  display: inline-block; margin-left: 8px; padding: 2px 8px; font-size: 0.85rem;
  color: var(--accent-texte); background: var(--accent); border-radius: 999px;
}

/* État de l'app et page d'essai iPhone */
button:disabled { opacity: 0.45; cursor: default; }
.liste-alertes { padding-left: 1.2rem; }
.essai-images img { display: block; width: 100%; height: auto; margin: 0 0 12px; border-radius: 10px; }
