/* Inventaire annuel 7G (12/10/2026) — styles propres à la saisie annuelle.
   Le commun (couleurs clair/sombre, police, en-tête, connexion, boutons, champs, pastilles, fenêtres, toast)
   vient de 7g-commun.css, chargé avant. Aucune couleur en dur hors du bleu de marque (#0C3D63) déjà utilisé là-bas. */

#app { min-height: 100dvh; display: flex; flex-direction: column; }
main { flex: 1; width: 100%; max-width: 1500px; margin: 0 auto; padding: 16px; }
main:focus { outline: none; }
.ref { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 12px; color: var(--muted); }
.n { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.neg { color: var(--rouge); } .pos { color: var(--vert); }
.aide-g { margin: 4px 0 10px; color: var(--muted); font-size: 13.5px; }
.erreur-txt { color: var(--rouge); font-size: 13px; }
.espace { flex: 1; }
h1 { font-size: 20px; font-weight: 600; margin: 0 0 4px; text-wrap: balance; }
.btn.grand { min-height: 52px; font-size: 16px; }
.lien { border: 0; background: none; color: var(--accent); text-decoration: underline; cursor: pointer; padding: 0; font: inherit; }

/* en-tête */
.reseau { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-soft); padding: 4px 10px; border-radius: 999px; background: var(--surface2); border: 1px solid var(--line); white-space: nowrap; }
.reseau.hors { color: var(--rouge); background: var(--rouge-doux); border-color: transparent; }
.reseau.hors .point { background: var(--rouge); }
.menu-moi { position: absolute; right: 16px; top: 58px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 8px; display: grid; min-width: 220px; z-index: 30; }
.menu-moi p { margin: 4px 8px 8px; font-size: 12.5px; color: var(--muted); }
.menu-moi a, .menu-moi button { text-align: left; padding: 9px 10px; border-radius: 8px; border: 0; background: none; cursor: pointer; text-decoration: none; color: var(--ink); }
.menu-moi a:hover, .menu-moi button:hover { background: var(--surface2); }

/* cartes, formulaires */
.carte-annuel, .bloc-r { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin-bottom: 16px; }
.bloc-r { overflow-x: auto; }
.inc .pastille { white-space: normal; height: auto; padding: 3px 9px; }
.carte-annuel { max-width: 760px; margin: 0 auto 16px; }
.carte-annuel h2, .bloc-r h2 { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; margin: 0 0 10px; display: flex; justify-content: space-between; gap: 10px; }
.grille-form { display: grid; gap: 12px; }
fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin: 0; display: grid; gap: 8px; }
legend { font-size: 12.5px; color: var(--ink-soft); font-weight: 500; padding: 0 4px; }
.zones-choix { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.zones-choix .champ { grid-column: 1 / -1; }
.case { display: flex; align-items: center; gap: 8px; min-height: 36px; cursor: pointer; }
.case input { width: 20px; height: 20px; accent-color: #0C3D63; flex: none; }
.ligne { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.ligne > span:first-child { flex: 1; min-width: 180px; }
.ligne:last-child { border-bottom: 0; }
.ligne-b { display: flex; gap: 8px; flex-wrap: wrap; }
.ligne-form { display: flex; gap: 8px; margin-top: 10px; }
.tete-vue { margin-bottom: 12px; }
.actions-tete { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }

/* zones */
.scan-zone { display: flex; gap: 8px; margin-bottom: 12px; }
.tuiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin-bottom: 16px; }
.tuile { display: grid; gap: 6px; text-align: left; padding: 16px; min-height: 120px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; box-shadow: var(--shadow-sm); align-content: start; }
.tuile b { font-size: 17px; font-weight: 600; }
.tuile span:not(.pastille) { font-size: 13px; color: var(--ink-soft); }
.tuile small { color: var(--muted); font-size: 12.5px; min-height: 1em; }
.tuile .pastille { justify-self: start; }
.tuile.choisie { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-doux); }
.tuile[aria-disabled="true"] { opacity: .6; }
.compteur-bas { color: var(--ink-soft); text-align: center; }

/* écran de comptage */
.compter { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; align-items: start; }
.barre-zone { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.nom-zone { font-size: 18px; font-weight: 600; }
.compteur-haut { margin-left: auto; font-size: 13.5px; color: var(--ink-soft); }
.compteur-haut b { font-family: var(--mono); color: var(--ink); }
.rejets { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-radius: 12px; background: var(--rouge-doux); color: var(--rouge); }
.col-scan { display: grid; gap: 12px; min-width: 0; }
.camera { position: relative; border-radius: 16px; overflow: hidden; background: #0B1622; aspect-ratio: 16 / 9; max-height: 32vh; width: 100%; }
.camera video { width: 100%; height: 100%; object-fit: cover; display: block; }
.viseur { position: absolute; inset: 18% 30%; border: 3px solid rgba(255,255,255,.85); border-radius: 14px; box-shadow: 0 0 0 999px rgba(0,0,0,.18); pointer-events: none; }
.cam-msg { position: absolute; left: 0; right: 0; bottom: 0; margin: 0; padding: 8px 12px; color: #fff; font-size: 13px; background: rgba(0,0,0,.45); }
.cam-msg:empty { display: none; }
.derniere { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; align-items: baseline; padding: 12px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.derniere .lib { grid-column: 1 / -1; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.d-art { font-size: 19px; font-weight: 600; overflow-wrap: anywhere; }
.d-q { font: 600 30px/1 var(--mono); text-align: right; }
.d-q small, .c-q small { font: 400 13px var(--f); color: var(--muted); margin-left: 4px; }
.d-tot { grid-column: 1 / -1; font-size: 13px; color: var(--ink-soft); }
.derniere.flash { animation: flash .7s ease-out; }
@keyframes flash { from { background: var(--vert-doux); border-color: var(--vert); } to { background: var(--surface); } }
.courant { min-height: 74px; display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 14px; border: 2px dashed var(--line-2); background: var(--surface2); }
.courant.actif { border-style: solid; border-color: var(--accent); background: var(--accent-doux); }
.courant.plus1 { border-style: solid; border-color: var(--vert); background: var(--vert-doux); }
.courant .invite { margin: 0; color: var(--ink-soft); font-size: 16px; }
.c-art { flex: 1; min-width: 0; display: grid; gap: 3px; }
.c-art b { font-size: 18px; font-weight: 600; overflow-wrap: anywhere; }
.c-art .pastille { justify-self: start; white-space: normal; height: auto; padding: 3px 9px; }
.c-q { font: 600 40px/1 var(--mono); min-width: 2ch; text-align: right; }
.c-q.faux { color: var(--rouge); }
.saisie-l { font-size: 12.5px; color: var(--ink-soft); font-weight: 500; margin-bottom: -6px; }
.saisie { font: 500 20px var(--mono) !important; min-height: 52px !important; }
.pave { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.pave .zero { grid-column: 1 / span 3; grid-row: 4; }
.pave button { min-height: 60px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font: 500 26px var(--mono); cursor: pointer; touch-action: manipulation; }
.pave button:active { background: var(--accent-doux); }
.pave .valider { grid-column: 4; grid-row: 3 / span 2; background: #0C3D63; border-color: #0C3D63; color: #fff; font: 600 19px var(--f); display: grid; place-content: center; gap: 2px; }
.pave .valider small { font-size: 12px; opacity: .75; font-weight: 400; }
.pave [data-k="⌫"] { font-family: var(--f); }
.outils { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.outils .btn { min-height: 48px; }
.bascule[aria-pressed="true"] { background: var(--vert-doux); border-color: var(--vert); color: var(--vert); font-weight: 600; }
.col-liste { display: grid; gap: 12px; min-width: 0; position: sticky; top: 76px; max-height: calc(100dvh - 92px); overflow: auto; }
.col-liste details { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 8px 12px; }
.col-liste summary { cursor: pointer; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; padding: 6px 0; }
.col-liste input[type=search] { margin: 6px 0; min-height: 36px; }
.zart, .ch-res { display: grid; }
.za { display: grid; grid-template-columns: 9px minmax(0, 1fr) auto; align-items: center; gap: 10px; text-align: left; padding: 9px 4px; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--ink); cursor: pointer; }
.ch-res .za, .rattache .za { grid-template-columns: minmax(0, 1fr); }
.za:hover { background: var(--surface2); }
.za .t { display: grid; min-width: 0; }
.za .t b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.za .q { font-family: var(--mono); font-weight: 600; }
.za .q small { color: var(--muted); font-weight: 400; }
.za.fait .t b { color: var(--ink-soft); }
.hist .h { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto auto; gap: 8px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.hist .h b { font-family: var(--mono); }
.apercu { max-width: 100%; max-height: 180px; border-radius: 10px; justify-self: start; }
.video-scan { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 16px; background: #0B1622; }

/* tableau de bord */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.kpi { display: grid; gap: 4px; padding: 14px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.kpi b { font: 500 28px/1 var(--mono); }
.kpi span { font-size: 13px; color: var(--ink-soft); }
.kpi.bas b { color: var(--orange); }
.barre-av { grid-column: 1 / -1; height: 8px; border-radius: 99px; background: var(--surface2); border: 1px solid var(--line); overflow: hidden; }
.barre-av span { display: block; height: 100%; width: 0; background: var(--vert); transition: width .4s; }
.sous-onglets { display: flex; gap: 4px; padding: 3px; border-radius: 10px; background: var(--surface2); border: 1px solid var(--line); margin-bottom: 14px; overflow-x: auto; }
.sous-onglets button { padding: 7px 14px; border-radius: 7px; border: 0; background: none; color: var(--muted); font-weight: 500; cursor: pointer; white-space: nowrap; }
.sous-onglets button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.deux { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.tab { width: 100%; border-collapse: collapse; font-size: 13px; }
.tab th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; padding: 8px; border-bottom: 1px solid var(--line-2); position: sticky; top: 0; background: var(--surface); }
.tab th.n { text-align: right; }
.tab td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tab tr.hors td { background: var(--orange-doux); }
.tab input[type=checkbox] { width: 18px; height: 18px; accent-color: #0C3D63; }
.defile { overflow: auto; max-height: 62vh; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.defile.court { max-height: 260px; border: 0; }
.feed { display: grid; max-height: 62vh; overflow: auto; }
.feed .f { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto auto; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.feed .f.annule { opacity: .55; }
.feed .f.annule b:not(.n) { text-decoration: line-through; }
.synth { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: baseline; margin-bottom: 10px; font-size: 13.5px; color: var(--ink-soft); }
.synth b { font-family: var(--mono); color: var(--ink); font-size: 15px; }
.filtres { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.puce-f { padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); font-size: 12.5px; cursor: pointer; color: var(--ink-soft); }
.puce-f[aria-pressed="true"] { background: #0C3D63; border-color: #0C3D63; color: #fff; }
.cartes-inc { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.inc { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.inc.a_rattacher { border-color: var(--orange); }
.inc img, .sans-photo { width: 110px; height: 110px; object-fit: cover; border-radius: 10px; background: var(--surface2); display: grid; place-items: center; color: var(--muted); font-size: 12px; }
.inc p { margin: 4px 0 8px; }
.rattache { display: grid; gap: 6px; }
.cloture .recap { margin: 0 0 12px; padding-left: 18px; display: grid; gap: 6px; }
.recap li.ok::marker { color: var(--vert); } .recap li.att::marker { color: var(--orange); } .recap li.ko { color: var(--rouge); }
.cloture fieldset { margin: 10px 0; }

/* poste et téléphone */
@media (max-width: 1100px) { .deux { grid-template-columns: 1fr; } }
@media (max-width: 900px) {
  .compter { grid-template-columns: 1fr; }
  .col-liste { position: static; max-height: none; }
}
@media (max-width: 700px) {
  html { -webkit-text-size-adjust: 100%; }
  html, body { overflow-x: clip; }
  input:not([type=checkbox]):not([type=radio]):not([type=file]), select, textarea { font-size: 16px !important; min-height: 44px; }
  .entete { flex-wrap: wrap; gap: 8px; padding-inline: 12px; }
  .entete .onglets { order: 3; flex-basis: 100%; }
  .entete .onglets a { flex: 1; text-align: center; }
  .marque { flex: 1; min-width: 0; }
  .nom small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 46vw; }
  .reseau { font-size: 12px; }
  main { padding: 10px 12px calc(20px + env(safe-area-inset-bottom)); }
  body[data-vue="compter"] .entete .onglets { display: none; }
  /* écran de comptage du téléphone : tout tient sur un écran (caméra, dernière saisie, article, pavé, outils) */
  .compter { gap: 8px; }
  .compter .col-scan { gap: 8px; }
  .compter.tactile .saisie, .compter.tactile .saisie-l { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
  .barre-zone { gap: 6px 10px; }
  .barre-zone .btn.petit { min-height: 36px; }
  .nom-zone { font-size: 16px; }
  .camera { max-height: 22vh; aspect-ratio: 16 / 9; border-radius: 12px; }
  .derniere { padding: 8px 12px; border-radius: 12px; }
  .courant { min-height: 58px; padding: 8px 12px; border-radius: 12px; }
  .c-art b { font-size: 16px; } .c-q { font-size: 32px; }
  .pave { gap: 6px; }
  .pave button { min-height: 50px; font-size: 24px; border-radius: 12px; }
  .outils { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .outils .btn { white-space: normal; font-size: 14px; min-height: 46px; padding: 0 6px; line-height: 1.15; }
  .compteur-haut { margin-left: 0; flex-basis: 100%; font-size: 13px; }
  .d-art { font-size: 16px; } .d-q { font-size: 24px; }
  .derniere .lib { font-size: 10.5px; }
  .tuiles { grid-template-columns: 1fr 1fr; }
  .tuile { min-height: 110px; padding: 12px; }
  .inc { grid-template-columns: 80px minmax(0, 1fr); } .inc img, .sans-photo { width: 80px; height: 80px; }
  .cartes-inc { grid-template-columns: 1fr; }
  .scan-zone { flex-wrap: wrap; } .scan-zone input { flex: 1 1 200px; }
  .tab { font-size: 12.5px; }
  .tab th, .tab td { padding: 6px 5px; }
  .bloc-r { padding: 12px; }
  .toast { bottom: calc(16px + env(safe-area-inset-bottom)); }
}
