/* Jarvis Card, maquette : compléments de l'espace surveillant (contrôle d'entrée).
   Couleurs uniquement par les jetons (base.css et charte de l'école). */

.mapp-nav.n4 { grid-template-columns: repeat(4, 1fr); }

/* Cibles tactiles de 44 px sur cette page */
.puces button { min-height: 44px; }
.puces.a-la-ligne { flex-wrap: wrap; overflow: visible; }
.bloc-titre a { display: inline-flex; align-items: center; min-height: 44px; }
.petit { font-size: 13px; }
.feuille-titre { font-size: 20px; }
.bloc-liste { padding-top: 4px; padding-bottom: 4px; }
.alerte-danger { background: var(--danger-soft); color: var(--danger); }

.contexte { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; color: var(--ink-2); }
.contexte .ic { color: var(--ecole-lite); margin-top: 3px; }

/* Grand bouton de lecture NFC, avec ondes sobres */
.nfc {
  position: relative; overflow: hidden; isolation: isolate;
  display: grid; justify-items: center; align-content: center; gap: 4px;
  width: 100%; min-height: 252px; padding: 30px 16px 24px;
  border: 2px solid var(--ecole-lite); border-radius: 24px;
  background: var(--ecole-soft); color: var(--ink); text-align: center;
  transition: transform var(--t-fast) var(--ease);
}
.nfc:active { transform: scale(.99); }
.nfc:focus-visible { border-radius: 24px; }
.nfc-cible { position: relative; display: grid; place-items: center; width: 104px; height: 104px; margin-bottom: 18px; }
.nfc-coeur { position: relative; z-index: 1; display: grid; place-items: center; width: 104px; height: 104px; border-radius: 50%; background: var(--ecole); color: var(--on-ecole); box-shadow: var(--shadow-2); }
.nfc-coeur .ic { width: 50px; height: 50px; }
.ondes { position: absolute; inset: 0; z-index: 0; }
.ondes i { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--ecole-lite); opacity: 0; animation: onde 2.7s var(--ease) infinite; }
.ondes i:nth-child(2) { animation-delay: .9s; }
.ondes i:nth-child(3) { animation-delay: 1.8s; }
@keyframes onde { 0% { opacity: .55; transform: scale(1); } 100% { opacity: 0; transform: scale(2.5); } }
.nfc.lecture .ondes i { animation-duration: 1.2s; }
.nfc.lecture .ondes i:nth-child(2) { animation-delay: .4s; }
.nfc.lecture .ondes i:nth-child(3) { animation-delay: .8s; }
.nfc.lecture .nfc-coeur { animation: battement .6s ease-in-out infinite alternate; }
@keyframes battement { to { transform: scale(1.06); } }
.nfc-titre { font-size: 20px; }
.nfc-sous { font-size: 14px; color: var(--ink-2); }

/* Cadre de visée du QR (aucune image de caméra simulée) */
.viseur {
  position: relative; display: grid; place-items: center;
  width: min(280px, 100%); aspect-ratio: 1; margin: 16px auto 12px;
  border-radius: 22px; overflow: hidden; background: var(--ecole); color: var(--on-ecole);
}
.viseur .coin { position: absolute; width: 46px; height: 46px; border: 4px solid var(--on-ecole); }
.viseur .c-hg { top: 16%; left: 16%; border-right: 0; border-bottom: 0; border-top-left-radius: 12px; }
.viseur .c-hd { top: 16%; right: 16%; border-left: 0; border-bottom: 0; border-top-right-radius: 12px; }
.viseur .c-bg { bottom: 16%; left: 16%; border-right: 0; border-top: 0; border-bottom-left-radius: 12px; }
.viseur .c-bd { bottom: 16%; right: 16%; border-left: 0; border-top: 0; border-bottom-right-radius: 12px; }
.viseur .balayage { position: absolute; left: 20%; right: 20%; top: 20%; height: 3px; border-radius: 3px; background: var(--ecole-2); animation: balayage 1.4s ease-in-out infinite alternate; }
@keyframes balayage { from { top: 20%; } to { top: 80%; } }
.viseur-txt { display: grid; justify-items: center; gap: 6px; font-size: 13.5px; font-weight: 600; }

@media (prefers-reduced-motion: reduce) {
  .ondes i { animation: none !important; }
  .ondes i:nth-child(1) { transform: scale(1.3); opacity: .35; }
  .ondes i:nth-child(2) { transform: scale(1.65); opacity: .22; }
  .ondes i:nth-child(3) { transform: scale(2); opacity: .12; }
  .nfc.lecture .nfc-coeur { animation: none !important; }
  .viseur .balayage { animation: none !important; top: 50%; }
}

/* Résultat du scan */
.res-statut { display: flex; align-items: flex-start; gap: 12px; padding: 16px; border-radius: 16px; }
.res-statut > .ic { width: 34px; height: 34px; margin-top: 1px; }
.res-statut strong { display: block; font-size: 21px; line-height: 1.2; }
.res-statut span { display: block; margin-top: 4px; font-size: 14.5px; font-weight: 500; }
.res-ok { background: var(--ok-soft); color: var(--ok); }
.res-warn { background: var(--warn-soft); color: var(--warn); }
.res-danger { background: var(--danger-soft); color: var(--danger); }
.res-personne { display: flex; align-items: center; gap: 16px; margin: 16px 0 4px; }
.res-photo { width: 92px; height: 116px; border-radius: 14px; object-fit: cover; background: var(--surface-3); flex: none; }
.res-initiales { display: grid; place-items: center; font-size: 30px; font-weight: 800; background: var(--ecole); color: var(--on-ecole); }
.res-personne > div { display: grid; gap: 2px; min-width: 0; }
.res-personne h2 { font-size: 22px; }
.res-personne span { font-size: 15px; color: var(--ink-2); }
.res-personne .mono { font-size: 14px; color: var(--muted); }
.res-personne .res-initiales { font-size: 30px; color: var(--on-ecole); }
.res-infos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 14px 0 16px; }
.res-infos div { min-width: 0; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.res-infos dt { font-size: 12.5px; color: var(--muted); }
.res-infos dd { margin: 0; font-size: 14.5px; font-weight: 600; }
.res-infos dd.mono { font-weight: 500; }
.res-actions { display: grid; gap: 8px; }
@media (min-width: 420px) { .res-actions.cote { grid-template-columns: 1fr 1fr; } }

/* Lignes cliquables (boutons qui contiennent une .ligne) */
.ligne-btn { display: block; width: 100%; padding: 0; border: 0; background: none; color: inherit; text-align: left; border-radius: 12px; }
.ligne-btn + .ligne-btn > .ligne { border-top: 1px solid var(--line); }
.ligne-btn:hover .corps strong { color: var(--ecole-lite); }
.ligne .corps .badge { font-size: 13px; }

/* Journal du jour */
.mapp .tuiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.mapp .tuile .val { font-size: 26px; }
.heure { flex: none; width: 46px; font-size: 14px; font-weight: 500; color: var(--ink-2); }

/* Retards : sélection multiple */
.barre-sel { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tout { display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 600; cursor: pointer; }
.tout input, .case input { flex: none; width: 22px; height: 22px; margin: 0; accent-color: var(--ecole-lite); }
.ligne.case { min-height: 64px; cursor: pointer; }
.barre-action {
  position: sticky; bottom: 78px; z-index: 5; padding: 8px;
  border: 1px solid var(--line); border-radius: 30px; box-shadow: var(--shadow-2);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}

/* Recherche */
.recherche { position: relative; }
.recherche > .ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.recherche .input { padding-left: 40px; }
.fiche-lignes { margin: 10px 0 14px; }
.fiche-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.fiche-actions .btn { padding: 0 10px; }
