/* Plaine Altitude, maquettes : outil de remarques (outil de travail, jamais sur la boutique). Voir js/annotations.js. */
.an, .an-panneau, .an-fiche, .an-bulle, .an-pastille { font-family: var(--font-texte, system-ui, sans-serif); box-sizing: border-box; }
.an [hidden], .an-panneau[hidden], .an-bulle[hidden], .an-fiche [hidden] { display: none !important; }

/* Outil masqué (classe an-cache sur <html>) : seul Alt+A le fait revenir ; la bulle reste pour confirmer */
html.an-cache [data-an]:not(.an-bulle) { display: none !important; }

/* Barre en bas à droite */
.an { position: fixed; right: 1rem; bottom: var(--an-bas, 1rem); z-index: 2147483000; display: grid; justify-items: end; gap: 0.4rem; }
.an__barre { display: flex; gap: 0.3rem; padding: 0.3rem; border-radius: 12px; background: #fff; box-shadow: 0 10px 30px rgba(41,39,40,.25); }
.an__barre button { display: inline-flex; align-items: center; gap: 0.45rem; height: 2.5rem; padding: 0 0.85rem; border: 0; border-radius: 8px; font: 700 0.85rem/1 var(--font-texte, system-ui); cursor: pointer; }
.an__mode { background: var(--pa-noir, #292728); color: var(--pa-turquoise, #20c4c3); }
.an__mode svg { width: 1.1rem; height: 1.1rem; }
.an__mode[aria-pressed="true"] { background: var(--pa-turquoise, #20c4c3); color: var(--pa-noir, #292728); }
.an__compte { background: #f1f4f6; color: var(--pa-noir, #292728); }
.an__masquer { width: 2.5rem; justify-content: center; padding: 0 !important; background: #fff; color: #6b6f73; font-size: 1.3rem !important; font-weight: 400 !important; }
.an__masquer:hover { background: #f1f4f6; color: #292728; }
.an__compte b { display: inline-grid; place-items: center; min-width: 1.4rem; height: 1.4rem; padding: 0 0.3rem; border-radius: 999px; background: var(--pa-jaune, #ffbd20); font-size: 0.75rem; }
.an__aide { margin: 0; max-width: 17rem; padding: 0.55rem 0.75rem; border-radius: 8px; background: var(--pa-noir, #292728); color: #fff; font-size: 0.78rem; line-height: 1.4; box-shadow: 0 10px 30px rgba(41,39,40,.25); }

/* Mode annotation : viseur et cadre de survol */
html.an-actif, html.an-actif body, html.an-actif body *:not([data-an]):not([data-an] *) { cursor: crosshair !important; }
.an-survol { position: fixed; z-index: 2147482990; display: none; pointer-events: none; border: 2px solid var(--pa-turquoise, #20c4c3); border-radius: 4px; background: rgba(32,196,195,.08); }
.an-survol::after { content: attr(data-nom); position: absolute; left: -2px; top: -1.45rem; padding: 0.15rem 0.4rem; border-radius: 4px; background: var(--pa-turquoise, #20c4c3); color: #00302f; font: 700 0.68rem/1.2 system-ui, sans-serif; white-space: nowrap; }
.an-flash { outline: 3px solid var(--pa-jaune, #ffbd20) !important; outline-offset: 3px; transition: outline-color .3s; }

/* Pastilles numérotées */
.an-calque { position: absolute; left: 0; top: 0; width: 0; height: 0; z-index: 2147482980; }
.an-pastille { position: absolute; display: grid; place-items: center; width: 1.6rem; height: 1.6rem; margin: -0.8rem 0 0 -0.8rem; padding: 0; border: 2px solid #fff; border-radius: 50% 50% 50% 4px;
  background: var(--pa-jaune, #ffbd20); color: var(--pa-noir, #292728); font: 900 0.72rem/1 system-ui, sans-serif; cursor: pointer; box-shadow: 0 4px 12px rgba(41,39,40,.35); }
.an-pastille--fait { background: #c9d0d6; color: #555; }
.an-pastille--question { background: var(--pa-turquoise, #20c4c3); }

/* Fiche de saisie */
.an-fiche { position: absolute; z-index: 2147483001; display: grid; gap: 0.6rem; width: min(22rem, calc(100vw - 16px)); padding: 0.9rem; border-radius: 12px; background: #fff; color: #292728;
  border: 1px solid rgba(41,39,40,.15); box-shadow: 0 20px 50px rgba(41,39,40,.3); cursor: auto; }
.an-fiche__cible { margin: 0; font-size: 0.75rem; line-height: 1.4; color: #6b6f73; }
.an-fiche__cible q { color: #292728; font-weight: 700; }
.an-fiche__types { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.an-fiche__types input { position: absolute; opacity: 0; pointer-events: none; }
.an-fiche__types span { display: block; padding: 0.4rem 0.55rem; border-radius: 6px; border: 1px solid rgba(41,39,40,.2); font-size: 0.75rem; font-weight: 700; cursor: pointer; }
.an-fiche__types input:checked + span { background: #292728; border-color: #292728; color: #fff; }
.an-fiche__champ { display: grid; gap: 0.25rem; }
.an-fiche__champ span { font-size: 0.7rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: #6b6f73; }
.an-fiche textarea, .an-fiche input[name="auteur"] { width: 100%; box-sizing: border-box; padding: 0.55rem 0.65rem; border-radius: 8px; border: 1px solid rgba(41,39,40,.25); font: 500 0.88rem/1.45 var(--font-texte, system-ui); color: #292728; resize: vertical; }
.an-fiche textarea:focus, .an-fiche input:focus { outline: 2px solid var(--pa-turquoise, #20c4c3); outline-offset: 0; border-color: transparent; }
.an-fiche__bas { display: flex; align-items: center; gap: 0.4rem; }
.an-fiche__auteur { display: flex; align-items: center; gap: 0.35rem; margin-right: auto; font-size: 0.75rem; color: #6b6f73; }
.an-fiche__auteur input[name="auteur"] { width: 6.5rem; padding: 0.35rem 0.5rem; font-size: 0.78rem; }
.an-fiche__bas button { height: 2.3rem; padding: 0 0.8rem; border-radius: 8px; border: 1px solid rgba(41,39,40,.2); background: #fff; font: 700 0.8rem/1 var(--font-texte, system-ui); cursor: pointer; }
.an-fiche__bas .an-fiche__ok { border-color: #292728; background: #292728; color: #fff; }
.an-fiche__ok:disabled { opacity: .5; }

/* Liste des remarques */
.an-panneau { position: fixed; right: 1rem; top: 1rem; bottom: calc(var(--an-bas, 1rem) + 3.8rem); z-index: 2147483000; display: flex; flex-direction: column; width: min(24rem, calc(100vw - 2rem));
  border-radius: 14px; background: #fff; color: #292728; box-shadow: 0 20px 50px rgba(41,39,40,.3); overflow: hidden; }
.an-panneau__tete { display: flex; align-items: center; justify-content: space-between; padding: 0.85rem 1rem 0.3rem; font-size: 0.95rem; }
.an-panneau__fermer { width: 2rem; height: 2rem; border: 0; border-radius: 6px; background: #f1f4f6; font-size: 1.2rem; line-height: 1; cursor: pointer; }
.an-panneau__note, .an-panneau__vide { margin: 0; padding: 0 1rem 0.6rem; font-size: 0.75rem; line-height: 1.45; color: #6b6f73; }
.an-panneau ol { flex: 1; margin: 0; padding: 0 0.6rem 0.8rem; overflow: auto; list-style: none; }
.an-item { display: grid; gap: 0.3rem; margin-top: 0.4rem; padding: 0.7rem 0.75rem; border-radius: 10px; border: 1px solid rgba(41,39,40,.12); transition: background .3s; }
.an-item.est-vu { background: #fff6dd; }
.an-item--fait { opacity: .6; }
.an-item__tete { display: flex; align-items: center; gap: 0.45rem; font-size: 0.72rem; font-weight: 800; }
.an-item__n { display: grid; place-items: center; width: 1.4rem; height: 1.4rem; border-radius: 50%; background: var(--pa-jaune, #ffbd20); }
.an-item--fait .an-item__n { background: #c9d0d6; }
.an-item__type { text-transform: uppercase; letter-spacing: 0.05em; color: #6b6f73; }
.an-item__statut { margin-left: auto; padding: 0.15rem 0.45rem; border-radius: 999px; background: #f1f4f6; }
.an-item--fait .an-item__statut { background: #dff5e7; color: #1c6b3a; }
.an-item__texte { margin: 0; font-size: 0.86rem; line-height: 1.45; white-space: pre-wrap; }
.an-item__nouveau { margin: 0; padding: 0.4rem 0.55rem; border-radius: 6px; background: #eefafa; font-size: 0.8rem; line-height: 1.45; white-space: pre-wrap; }
.an-item__cible { margin: 0; font-size: 0.7rem; line-height: 1.4; color: #8a8f94; }
.an-item__reponse { margin: 0; padding: 0.4rem 0.55rem; border-radius: 6px; background: #f1f4f6; font-size: 0.78rem; line-height: 1.45; }
.an-item__actions { display: flex; gap: 0.3rem; }
.an-item__actions button { padding: 0.3rem 0.55rem; border-radius: 6px; border: 1px solid rgba(41,39,40,.18); background: #fff; font: 700 0.72rem/1 var(--font-texte, system-ui); cursor: pointer; }
.an-bulle { position: fixed; left: 50%; bottom: calc(var(--an-bas, 1rem) + 3.6rem); z-index: 2147483002; transform: translateX(-50%); padding: 0.6rem 0.9rem; border-radius: 8px; background: #292728; color: #fff; font-size: 0.82rem; box-shadow: 0 10px 30px rgba(41,39,40,.3); }
@media (max-width: 639px) {
  .an { right: 0.6rem; }
  .an__barre button { height: 2.3rem; padding: 0 0.65rem; font-size: 0.8rem; }
  .an-panneau { right: 0.5rem; left: 0.5rem; top: 0.5rem; width: auto; }
}
@media print { .an, .an-panneau, .an-calque, .an-survol, .an-fiche, .an-bulle { display: none !important; } }
