:root { --bleu: #1d4ed8; --bleu-clair: #dbe6ff; --fond: #f5f7fb; --carte: #fff; --texte: #0f172a; --discret: #5b6475; --trait: #dde3ee; --ok: #15803d; --alerte: #b45309; --danger: #b91c1c; color-scheme: light dark; }
@media (prefers-color-scheme: dark) { :root { --fond: #0b1020; --carte: #141b30; --texte: #e8edf8; --discret: #9aa6c0; --trait: #26304d; --bleu-clair: #1b2a55; --bleu: #5b8cff; --ok: #4ade80; --alerte: #fbbf24; --danger: #f87171; } }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--fond); color: var(--texte); font: 16px/1.45 system-ui, -apple-system, 'Segoe UI', sans-serif; padding-bottom: env(safe-area-inset-bottom); }
.barre { position: sticky; top: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: calc(10px + env(safe-area-inset-top)) 16px 10px; background: color-mix(in srgb, var(--carte) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--trait); }
.barre h1 { margin: 0; font-size: 1.15rem; display: flex; align-items: center; gap: 8px; }
.barre-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.page { max-width: 760px; margin: 0 auto; padding: 16px; display: grid; gap: 18px; }
h2 { margin: 0 0 8px; font-size: 1.05rem; }
.carte { background: var(--carte); border: 1px solid var(--trait); border-radius: 14px; padding: 14px; }
label { display: block; font-size: .85rem; color: var(--discret); margin-bottom: 4px; }
input[type=text], input[type=password], textarea { width: 100%; font: inherit; color: inherit; background: var(--fond); border: 1px solid var(--trait); border-radius: 10px; padding: 10px 12px; }
textarea { resize: vertical; min-height: 56px; }
input:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--bleu); outline-offset: 2px; }
.ligne { display: flex; gap: 8px; margin-top: 8px; align-items: center; }
.ligne input { flex: 1; min-width: 0; }
.bouton { display: inline-block; font: inherit; font-weight: 600; background: var(--bleu); color: #fff; border: 0; border-radius: 10px; padding: 10px 14px; min-height: 44px; cursor: pointer; text-decoration: none; text-align: center; }
.bouton:disabled { opacity: .55; cursor: default; }
.bouton-discret { background: var(--bleu-clair); color: var(--bleu); min-height: 36px; padding: 6px 10px; font-size: .85rem; }
.bouton-danger { background: transparent; color: var(--danger); border: 1px solid var(--trait); }
.liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.colis { background: var(--carte); border: 1px solid var(--trait); border-radius: 14px; padding: 12px 14px; display: grid; gap: 6px; }
.colis-tete { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.colis-nom { font-weight: 650; overflow-wrap: anywhere; }
.colis-meta { color: var(--discret); font-size: .85rem; overflow-wrap: anywhere; }
.pastille { display: inline-block; white-space: nowrap; font-size: .78rem; font-weight: 650; border-radius: 99px; padding: 3px 10px; background: var(--bleu-clair); color: var(--bleu); }
.pastille-en_livraison, .pastille-a_retirer { background: #fef3c7; color: #92400e; }
.pastille-livre { background: #dcfce7; color: #166534; }
.pastille-probleme, .pastille-retourne { background: #fee2e2; color: #991b1b; }
.pastille-indisponible { background: #e5e7eb; color: #374151; }
@media (prefers-color-scheme: dark) { .pastille-en_livraison, .pastille-a_retirer { background: #4a3410; color: #fcd34d; } .pastille-livre { background: #12351f; color: #86efac; } .pastille-probleme, .pastille-retourne { background: #4a1818; color: #fca5a5; } .pastille-indisponible { background: #2a3045; color: #cbd5e1; } }
.avert { color: var(--alerte); font-size: .85rem; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.historique { margin: 6px 0 0; padding-left: 16px; font-size: .85rem; color: var(--discret); }
.discret { color: var(--discret); font-weight: 400; font-size: .85rem; }
.vide, .pied { color: var(--discret); text-align: center; font-size: .85rem; }
.bandeau { margin: 0; padding: 10px 12px; border-radius: 10px; background: #fef3c7; color: #92400e; font-size: .9rem; }
.bandeau-ok { background: #dcfce7; color: #166534; }
.liste-archive .colis { opacity: .8; }
.proposition { display: grid; gap: 6px; padding: 10px 0; border-top: 1px solid var(--trait); }
.proposition select { font: inherit; background: var(--fond); color: inherit; border: 1px solid var(--trait); border-radius: 10px; padding: 8px; }
.dialogue { border: 1px solid var(--trait); border-radius: 16px; background: var(--carte); color: var(--texte); max-width: 480px; width: calc(100% - 32px); padding: 18px; }
.dialogue::backdrop { background: rgba(0, 0, 0, .45); }
.dialogue input { margin: 6px 0; }
/* Connexion */
.page-login { display: grid; place-items: center; min-height: 100vh; padding: 24px; }
.porte { width: 100%; max-width: 380px; text-align: center; }
.porte-blason img { border-radius: 18px; }
.porte h1 { margin: 10px 0 0; }
.porte-sous-titre { color: var(--discret); margin: 4px 0 18px; }
.porte-formulaire { text-align: left; display: grid; gap: 8px; }
.porte-erreur { margin: 0; color: var(--danger); font-size: .9rem; }
.porte-aide { margin: 0; color: var(--discret); font-size: .8rem; }
.porte-retour { color: var(--bleu); font-size: .9rem; text-align: center; }
[hidden] { display: none !important; }
