/* =====================================================================
   Encadré « Connexion » (2026-10-16, assets/js/compte.js) : sous « Connexion » de l'en-tête, même esprit que le
   mini-panier (header.css) — ordinateur : sous le lien, aligné à droite ; téléphone (≤ 720 px) : toute la largeur
   sous l'en-tête. Chargé par le catalogue (lib/layout.php, fournitures) ET par le site vitrine (mma-private/layout.php),
   qui n'ont pas les mêmes feuilles de style : tout ce qu'il faut est ici, valeurs de secours comprises.
   ===================================================================== */

/* Déclencheur du catalogue : à côté du panier (le site vitrine garde « Connexion » dans son menu). */
.site-header .hdr-account {
  order: 2; display: inline-flex; align-items: center; gap: 0.45rem; min-height: 44px; min-width: 44px; padding: 0 0.2rem;
  color: var(--chrome); text-decoration: none; font-size: 0.95rem; white-space: nowrap; max-width: 16rem;
}
.site-header .hdr-account-l { overflow: hidden; text-overflow: ellipsis; }
.site-header .hdr-account-ico {
  flex: none; width: 1.15rem; height: 1.15rem; border-radius: 50%; position: relative;
  border: 2px solid currentColor; opacity: 0.85;
}
.site-header .hdr-account-ico::after {   /* silhouette : tête dans un cercle */
  content: ''; position: absolute; left: 50%; top: 18%; width: 34%; height: 34%; transform: translateX(-50%);
  border-radius: 50%; background: currentColor;
}
.site-header .hdr-account[data-acct-state="client"] .hdr-account-ico,
.site-header .hdr-account[data-acct-state="guest"] .hdr-account-ico { color: var(--chroma); opacity: 1; }
.site-header .hdr-account[aria-expanded="true"],
.site-header .nav-login[aria-expanded="true"] { color: var(--chrome); text-decoration: underline; text-decoration-color: var(--chroma); text-decoration-thickness: 2px; text-underline-offset: 0.35em; }
.site-header .hdr-account + .hdr-cart { margin-left: 0.6rem; }
@media (min-width: 961px) and (max-width: 1380px) {
  .site-header .hdr-account { margin-left: auto; }
}
@media (max-width: 960px) {
  .site-header .hdr-account { margin-left: auto; }
}
@media (max-width: 720px) {
  /* téléphones : 2e ligne de l'en-tête du catalogue = compte à gauche, panier à droite */
  .site-header .hdr-account { grid-column: 1 / -1; grid-row: 2; justify-self: start; margin-left: 0; max-width: calc(100% - 7.5rem); }
  .site-header .hdr-account + .hdr-cart { margin-left: 0; }
}

/* ---- L'encadré ---- */
.acct-panel {
  position: absolute; top: 100%; right: var(--gutter, 1.25rem); z-index: 6;
  width: min(23rem, calc(100vw - 2 * var(--gutter, 1.25rem)));
  overflow-y: auto; overscroll-behavior: contain;
  background: var(--ink-2, #0d0d12); color: var(--chrome, #e2e4ea);
  border: 1px solid var(--line, #262630); border-top: 2px solid var(--chroma, #a54cf5);
  border-radius: 0 0 var(--radius, 6px) var(--radius, 6px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
  font-family: var(--text, system-ui, sans-serif); font-size: 0.95rem; line-height: 1.45; text-align: left;
}
.acct-panel[hidden] { display: none; }
.acct-panel[aria-busy="true"] .acct-body { opacity: 0.6; }
.acct-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 0.35rem 0.4rem 0.35rem 1rem; border-bottom: 1px solid var(--line, #262630); }
.acct-title { margin: 0; font-family: var(--display, sans-serif); font-weight: 800; font-stretch: 115%; font-size: 1.05rem; overflow-wrap: anywhere; min-width: 0; }
.acct-title:focus { outline: none; }
.acct-title:focus-visible { outline: 3px solid var(--chroma, #a54cf5); outline-offset: 2px; }
.acct-x {
  flex: none; min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center;
  background: none; border: 0; border-radius: var(--radius, 6px); color: var(--chrome, #e2e4ea); font-size: 1.6rem; line-height: 1; cursor: pointer;
}
.acct-x:hover { background: var(--ink-3, #17171f); }
.acct-body { padding: 0.75rem 1rem 1rem; display: flex; flex-direction: column; gap: 0.75rem; }
.acct-msg { margin: 0; padding: 0.5rem 0.75rem; border-radius: var(--radius, 6px); background: var(--err-bg, #2a0f0d); color: var(--err, #ff8a80); border: 1px solid var(--err-line, #ff6b5e); }
.acct-msg.is-ok { background: var(--ink-3, #17171f); color: var(--chrome, #e2e4ea); border-color: var(--chroma, #a54cf5); }
.acct-msg[hidden] { display: none; }
.acct-p { margin: 0; color: var(--chrome-2, #a3a6b0); }
.acct-p strong { color: var(--chrome, #e2e4ea); }
.acct-h3 { margin: 0.25rem 0 0; font-family: var(--display, sans-serif); font-weight: 700; font-stretch: 110%; font-size: 1rem; color: var(--chrome, #e2e4ea); }
.acct-form { display: flex; flex-direction: column; gap: 0.6rem; margin: 0; }
.acct-field { display: flex; flex-direction: column; gap: 0.3rem; }
.acct-field > span { font-weight: 600; font-size: 0.95rem; }
.acct-panel input[type="text"], .acct-panel input[type="password"] {
  width: 100%; min-height: 44px; font: inherit; font-size: 1rem; color: var(--chrome, #e2e4ea);
  background: var(--ink, #050507); border: 1px solid #4a4d57; border-radius: var(--radius, 6px); padding: 0.6rem 0.75rem;
}
.acct-panel input:focus-visible { outline: 2px solid var(--chroma, #a54cf5); outline-offset: 1px; border-color: transparent; }
.acct-btn {
  display: flex; align-items: center; justify-content: center; width: 100%; min-height: 44px; padding: 0.6rem 1rem;
  font-family: var(--display, sans-serif); font-weight: 700; font-stretch: 115%; font-size: 1rem; line-height: 1.2;
  color: var(--ink, #050507); background: var(--chroma, #a54cf5); border: 1px solid transparent; border-radius: 999px;
  text-decoration: none; cursor: pointer;
}
.acct-btn:hover { background: color-mix(in oklab, var(--chroma, #a54cf5) 80%, white); }
.acct-btn.is-ghost { background: transparent; color: var(--chrome, #e2e4ea); border-color: var(--chrome-3, #5b5e69); }
.acct-btn.is-ghost:hover { background: var(--ink-3, #17171f); border-color: var(--chroma, #a54cf5); }
.acct-btn:disabled { opacity: 0.5; cursor: wait; }
.acct-btn:focus-visible { outline: 3px solid var(--chrome, #e2e4ea); outline-offset: 2px; }
.acct-sep { margin: 0.1rem 0 0; padding-top: 0.75rem; border-top: 1px solid var(--line, #262630); }
.acct-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.acct-links a {
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; min-height: 44px;
  color: var(--chrome, #e2e4ea); text-decoration: none; border-bottom: 1px solid var(--line, #262630);
}
.acct-links a:hover { color: #fff; text-decoration: underline; text-decoration-color: var(--chroma, #a54cf5); }
.acct-links .acct-badge {
  min-width: 1.5rem; padding: 0.05rem 0.4rem; border-radius: 999px; text-align: center;
  background: var(--chroma, #a54cf5); color: var(--ink, #050507); font-weight: 700; font-size: 0.875rem;
}
.acct-small { margin: 0; font-size: 0.875rem; color: var(--chrome-2, #a3a6b0); }
.acct-small a, .acct-p a { color: var(--chrome, #e2e4ea); display: flex; align-items: center; width: fit-content; min-height: 44px; }
.acct-live { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
@media (max-width: 720px) {
  .acct-panel { left: 0; right: 0; width: auto; border-radius: 0; border-inline: 0; }
}
@media (prefers-reduced-motion: reduce) { .acct-btn { transition: none; } }
/* Lien « Mot de passe oublié ? » de login.php (2026-10-16, lib/reset.php) : cible tactile ≥ 44 px. */
.cat-forgot { display: inline-flex; align-items: center; min-height: 44px; font-size: 0.95rem; }

/* Rappel de connexion (2026-10-16, compte.js) : bandeau discret sous l'en-tête, refermable ; jamais de nom de compte. */
.acct-remind {
  display: flex; align-items: center; gap: 0.5rem 0.75rem; flex-wrap: wrap;
  padding: 0.4rem var(--gutter, 1.25rem);
  background: var(--ink-2, #0d0d12); color: var(--chrome, #e2e4ea);
  border-bottom: 1px solid var(--line, #262630);
  font-family: var(--text, system-ui, sans-serif); font-size: 0.95rem; line-height: 1.4;
}
.acct-remind-t { margin: 0; flex: 1 1 16rem; color: var(--chrome-2, #a3a6b0); }
.acct-remind .acct-remind-go { width: auto; flex: none; padding-inline: 1.2rem; font-size: 0.95rem; }
.acct-remind .acct-remind-x { flex: none; }
@media (max-width: 720px) {
  .acct-remind { padding-inline: 1rem; }
  .acct-remind-t { flex-basis: calc(100% - 3.5rem); }
  .acct-remind .acct-remind-go { flex: 1 1 auto; }
}
