/* « Mes papiers » : complète site.css. */
:root {
  --urgent: #a1261b; --urgent-clair: #fbe7e5;
  --afaire: #8a5a00; --afaire-clair: #fdf1d8;
}
@media (prefers-color-scheme: dark) {
  :root { --urgent: #f19a90; --urgent-clair: #3b1d1a; --afaire: #f1c46b; --afaire-clair: #3a2e14; }
}

.maquette-bandeau { font-size: .8rem; text-align: center; color: var(--doux); border: 1px dashed var(--ligne);
  border-radius: 8px; padding: 4px 8px; margin-bottom: 10px; }

.onglets { display: flex; gap: 6px; position: sticky; top: 0; z-index: 5; background: var(--fond); padding: 6px 0; }
.onglets a { flex: 1; text-align: center; text-decoration: none; padding: 10px 4px; border-radius: 10px;
  font-size: .9rem; font-weight: 600; color: var(--doux); background: var(--carte); border: 1px solid var(--ligne); }
.onglets a.actif { background: var(--accent); color: #fff; border-color: var(--accent); }
@media (prefers-color-scheme: dark) { .onglets a.actif { color: #10233d; } }

.confiance { font-size: .85rem; color: var(--doux); text-align: center; margin: 24px 0 0; }

/* Cartes de papiers */
.groupe-titre { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--doux);
  margin: 20px 0 6px; font-weight: 700; }
.papier { display: flex; gap: 12px; align-items: center; background: var(--carte); border: 1px solid var(--ligne);
  border-radius: var(--rayon); padding: 10px; margin: 8px 0; text-decoration: none; color: inherit; }
.papier .vignette { width: 72px; height: 46px; border-radius: 6px; object-fit: cover; background: var(--accent-clair);
  display: flex; align-items: center; justify-content: center; font-size: 1.5rem; flex: none; }
.papier .corps { flex: 1; min-width: 0; }
.papier .nom { font-weight: 600; line-height: 1.25; margin-right: 6px; }
.papier .date { font-size: .85rem; color: var(--doux); }
.papier.expire { border-left: 5px solid var(--urgent); }
.papier.afaire { border-left: 5px solid var(--afaire); }
.papier.bientot { border-left: 5px solid var(--accent); }
.papier.ok { border-left: 5px solid var(--ok); }

.pastille { display: inline-block; font-size: .75rem; font-weight: 700; padding: 2px 8px; border-radius: 99px;
  white-space: nowrap; }
.pastille.expire { background: var(--urgent-clair); color: var(--urgent); }
.pastille.afaire { background: var(--afaire-clair); color: var(--afaire); }
.pastille.bientot { background: var(--accent-clair); color: var(--accent); }
.pastille.ok { background: var(--ok-clair); color: var(--ok); }
.pastille.encours { background: var(--accent-clair); color: var(--accent); }
.pastille.sans { background: var(--ligne); color: var(--doux); }

/* « À faire maintenant » */
.maintenant { border-radius: var(--rayon); padding: 12px 14px; margin: 8px 0; background: var(--afaire-clair);
  color: var(--texte); border: 1px solid transparent; }
.maintenant.expire { background: var(--urgent-clair); }
.maintenant .titre { font-weight: 700; }
.maintenant .quoi { font-size: .82rem; color: var(--doux); }
.maintenant a.bouton { margin-top: 8px; padding: 8px 14px; font-size: .9rem; }

/* Choix du type */
.grille-types { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.grille-types button { background: var(--carte); color: var(--texte); border: 1px solid var(--ligne); text-align: left;
  font-weight: 600; padding: 12px; display: flex; gap: 8px; align-items: center; line-height: 1.2; }
.grille-types button .ic { font-size: 1.4rem; }

/* Photo */
.zone-photo { border: 2px dashed var(--ligne); border-radius: var(--rayon); padding: 14px; text-align: center; }
.zone-photo img { max-width: 100%; border-radius: 10px; display: block; margin: 0 auto 10px; }
.zone-photo input[type=file] { display: none; }
.lu { background: var(--ok-clair); color: var(--ok); border-radius: 10px; padding: 10px 12px; font-size: .9rem; margin: 10px 0; }
.lu.faux { background: var(--urgent-clair); color: var(--urgent); }

.photo-grande { width: 100%; border-radius: 12px; display: block; cursor: zoom-in; }
.plein-ecran { position: fixed; inset: 0; background: #000; z-index: 50; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 12px; padding: 12px; }
.plein-ecran[hidden] { display: none; }
.plein-ecran img { max-width: 100%; max-height: 85vh; }

/* Délai réel */
.delai-reel { background: var(--accent-clair); border-radius: var(--rayon); padding: 14px; margin: 12px 0; }
.delai-reel .chiffre { color: var(--accent); }

/* Calendrier des rappels */
.mois { font-weight: 700; margin: 18px 0 4px; text-transform: capitalize; }
.rappel-ligne { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--ligne); }
.rappel-ligne .jour { flex: none; width: 46px; text-align: center; background: var(--carte); border: 1px solid var(--ligne);
  border-radius: 10px; padding: 4px 0; line-height: 1.1; }
.rappel-ligne .jour b { display: block; font-size: 1.2rem; }
.rappel-ligne .jour span { font-size: .7rem; color: var(--doux); text-transform: uppercase; }
.rappel-ligne.important .jour { border-color: var(--afaire); }
.rappel-ligne .texte { flex: 1; min-width: 0; }
.rappel-ligne .titre { font-weight: 600; line-height: 1.3; }
.rappel-ligne .quoi { font-size: .82rem; color: var(--doux); }
.rappel-ligne.passe { opacity: .5; }

/* Déclarations régulières */
.interrupteur { display: flex; gap: 12px; align-items: flex-start; font-weight: 400; margin: 0; cursor: pointer; }
.interrupteur input { width: 22px; height: 22px; flex: none; margin-top: 2px; }
.a-verifier { font-size: .72rem; color: var(--afaire); border: 1px solid var(--afaire); border-radius: 99px; padding: 0 6px;
  white-space: nowrap; }

.resultats-pref button { display: block; width: 100%; text-align: left; background: var(--carte); color: var(--texte);
  border: 1px solid var(--ligne); font-weight: 400; margin: 6px 0; padding: 10px 12px; }
.choisi { padding: 10px 12px; border-radius: 10px; background: var(--ok-clair); color: var(--ok); font-weight: 600; }
textarea { width: 100%; font: .9rem/1.3 ui-monospace, Menlo, Consolas, monospace; padding: 10px; border-radius: 10px;
  border: 1px solid var(--ligne); background: var(--carte); color: var(--texte); }

/* Papiers datés du document et trop anciens : discrets */
.papier.ancien { border-left: 5px solid var(--ligne); }
.pastille.ancien { background: var(--ligne); color: var(--doux); }

/* Plusieurs photos */
.apercu-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.apercu-photos figure, .photo-papier { margin: 0 0 8px; text-align: center; }
.apercu-photos img { margin: 0 auto 2px; }
.note { background: var(--carte); border: 1px solid var(--ligne); border-radius: 10px; padding: 10px 12px; }

/* Recherche du type de papier */
#filtre { margin-bottom: 4px; }
.categorie[hidden], .grille-types button[hidden] { display: none; }

/* Rappel de copie de sauvegarde */
.sauvegarde-alerte { display: block; text-decoration: none; color: var(--texte); background: var(--accent-clair);
  border-radius: var(--rayon); padding: 10px 14px; margin: 8px 0; font-size: .9rem; }
.sauvegarde-alerte strong { color: var(--accent); white-space: nowrap; }
input[type=password] { width: 100%; padding: 12px; font: inherit; border: 1px solid var(--ligne); border-radius: 10px;
  background: var(--carte); color: var(--texte); }
button[disabled] { opacity: .5; cursor: default; }
