/* La page /compte. Elle reprend les jetons de site.css (couleurs, verre, police,
   boutons, barre du haut) et n'ajoute que ce qui lui est propre. */

[hidden] { display: none !important; }
button { font: inherit; color: inherit; }
.compte-page {
  min-height: 100vh; min-height: 100dvh;
  background:
    radial-gradient(120% 60% at 50% 0%, #0d1730 0%, transparent 60%),
    linear-gradient(180deg, #050812 0%, var(--fond) 100%);
}
.halos-fixes { position: fixed; }

.compte {
  width: 100%; max-width: 680px; margin: 0 auto;
  padding: calc(52px + clamp(32px, 7vw, 72px)) 16px calc(56px + env(safe-area-inset-bottom));
}
.compte-attente { text-align: center; color: var(--encre-3); padding: 40px 16px; }

/* La carte de verre, comme le panneau d'accès de la vitrine. */
.carte-compte {
  display: flex; flex-direction: column; align-items: stretch;
  padding: 36px 24px 28px; border-radius: 32px; text-align: center;
  background: linear-gradient(180deg, rgba(48, 60, 96, 0.5), rgba(16, 19, 30, 0.62));
  border: 1px solid var(--arete-haute);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.1) inset, 0 50px 100px -40px rgba(45, 111, 224, 0.6);
  backdrop-filter: var(--flou); -webkit-backdrop-filter: var(--flou);
}
.entree { max-width: 460px; margin: 0 auto; }
.entree-icone { margin: 0 auto 18px; filter: drop-shadow(0 16px 36px rgba(45, 111, 224, 0.55)); }
.compte-titre { font-size: clamp(1.875rem, 7vw, 2.5rem); font-weight: 700; letter-spacing: -0.035em; line-height: 1.05; text-wrap: balance; }
.compte-titre:focus { outline: none; }
.compte-sous { margin-top: 10px; color: var(--encre-2); font-size: 1rem; line-height: 1.45; text-wrap: pretty; }

.compte-erreur {
  margin-top: 20px; padding: 12px 14px; border-radius: 16px; text-align: left;
  background: rgba(255, 105, 97, 0.1); border: 1px solid rgba(255, 105, 97, 0.36);
  color: #ffb3ad; font-size: 0.9375rem; line-height: 1.45;
}

/* Les boutons des fournisseurs : thème sombre de leurs chartes (Google : fond #131314,
   bord #8E918F, texte #E3E3E3 ; Microsoft : fond #2F2F2F, texte blanc), logo en couleurs. */
.fournisseurs { margin-top: 26px; display: flex; flex-direction: column; gap: 12px; }
.fournisseurs:not(:has(a:not([hidden]))) { display: none; }
.fournisseur {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 50px; padding: 0 20px; border-radius: 999px;
  text-decoration: none; font-size: 1rem; letter-spacing: 0;
  transition: filter 160ms, transform 120ms;
}
.fournisseur svg { flex: none; width: 20px; height: 20px; }
.fournisseur:hover { filter: brightness(1.18); }
.fournisseur:active { transform: scale(0.98); }
.fournisseur.google { background: #131314; border: 1px solid #8e918f; color: #e3e3e3; font-family: Roboto, var(--police); font-weight: 500; }
.fournisseur.microsoft { background: #2f2f2f; border: 1px solid #2f2f2f; color: #fff; font-family: "Segoe UI", var(--police); font-weight: 600; }

.par-courriel { display: flex; flex-direction: column; align-items: stretch; }
.separateur { margin: 26px 0 14px; display: flex; align-items: center; gap: 12px; color: var(--encre-3); font-size: 0.875rem; }
.separateur::before, .separateur::after { content: ""; flex: 1; height: 1px; background: var(--arete-haute); }
.separateur.seul { margin-top: 26px; }
.separateur.seul::before, .separateur.seul::after { display: none; }
.separateur.seul span { flex: 1; }
.compte-champ {
  width: 100%; min-height: 52px; padding: 0 16px;
  border-radius: 16px; border: 1px solid var(--arete-haute);
  background: rgba(6, 8, 16, 0.6); color: var(--encre);
  font: 400 1.0625rem var(--police); text-align: center; color-scheme: dark;
  transition: border-color 160ms, box-shadow 160ms;
}
.compte-champ::placeholder { color: rgba(235, 235, 245, 0.32); }
.compte-champ:focus { outline: none; border-color: var(--bleu); box-shadow: 0 0 0 4px rgba(94, 158, 255, 0.22); }
.compte-champ[aria-invalid="true"] { border-color: rgba(255, 105, 97, 0.7); }
.piege { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.compte-envoyer { margin-top: 12px; width: 100%; border: 0; cursor: pointer; font-family: var(--police); }
.compte-envoyer[disabled] { opacity: 0.6; cursor: progress; }
.compte-message { margin-top: 14px; color: var(--encre-2); font-size: 0.9375rem; line-height: 1.45; text-wrap: pretty; }
.compte-message:empty { display: none; }
.compte-message.erreur { color: #ff9b94; }
.compte-message.envoye { padding: 12px 14px; border-radius: 16px; background: rgba(48, 209, 88, 0.1); border: 1px solid rgba(48, 209, 88, 0.32); color: #a6efb8; }
.compte-ferme { margin-top: 24px; color: var(--encre-2); }

/* ---------- Mes clés ---------- */
.espace-tete { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.espace-tete > div { min-width: 0; }
.espace-qui { margin-top: 8px; color: var(--encre-3); font-size: 0.875rem; overflow-wrap: anywhere; }
#qui-email { color: var(--encre-2); }

.action {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 0 16px; border-radius: 999px; cursor: pointer;
  background: rgba(255, 255, 255, 0.08); border: 1px solid var(--arete-haute);
  font-size: 0.9375rem; font-weight: 600; letter-spacing: -0.01em;
  transition: background 160ms, transform 120ms;
}
.action:hover { background: rgba(255, 255, 255, 0.14); }
.action:active { transform: scale(0.97); }
.action[disabled] { opacity: 0.6; cursor: progress; }
.action.petite { min-height: 40px; padding: 0 14px; font-size: 0.875rem; }
.action.fait { color: #7ee29a; border-color: rgba(48, 209, 88, 0.45); }
.action.danger-plein { border-color: transparent; background: linear-gradient(180deg, #ff7a72, #e0413a); color: #fff; box-shadow: 0 1px 0 rgba(255, 255, 255, 0.3) inset; }
.action.liberer { color: #ff9b94; }

.cles { margin-top: 24px; display: flex; flex-direction: column; gap: 14px; }
.cle-carte {
  position: relative; isolation: isolate; overflow: hidden;
  padding: 20px 20px 16px; border-radius: 24px;
  background: linear-gradient(180deg, rgba(40, 46, 66, 0.5), rgba(18, 21, 32, 0.55));
  border: 1px solid var(--arete);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.07) inset, 0 30px 60px -30px rgba(0, 0, 0, 0.7);
  backdrop-filter: var(--flou); -webkit-backdrop-filter: var(--flou);
}
.cle-tete { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.etiquette, .puce { flex: none; display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: 0.8125rem; font-weight: 600; }
.etiquette { color: var(--bleu-clair); background: rgba(94, 158, 255, 0.12); border: 1px solid rgba(94, 158, 255, 0.36); }
.etiquette.offerte { color: #c9b8ff; background: rgba(142, 124, 255, 0.14); border-color: rgba(142, 124, 255, 0.4); }
.puce.verte { color: #7ee29a; background: rgba(48, 209, 88, 0.13); border: 1px solid rgba(48, 209, 88, 0.36); }
.puce.rouge { color: #ff9b94; background: rgba(255, 105, 97, 0.12); border: 1px solid rgba(255, 105, 97, 0.38); }
.puce.orange { color: #ffc266; background: rgba(255, 159, 10, 0.12); border: 1px solid rgba(255, 159, 10, 0.38); }
.cle-nom { min-width: 0; margin-left: auto; color: var(--encre-2); font-size: 0.9375rem; overflow-wrap: anywhere; }

.cle-boite {
  margin-top: 14px; padding: 12px 12px 12px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px 12px; flex-wrap: wrap;
  border-radius: 16px; background: rgba(6, 8, 16, 0.55); border: 1px solid var(--arete);
}
.cle-texte { min-width: 0; font: 600 1rem/1.35 var(--mono); letter-spacing: 0.04em; overflow-wrap: anywhere; user-select: all; -webkit-user-select: all; }
.cle-boite .action { flex: none; }

.macs { margin-top: 14px; }
.macs-titre { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase; color: var(--encre-3); }
.macs-vide { margin-top: 8px; color: var(--encre-3); font-size: 0.9375rem; }
.macs ul { margin: 8px 0 0; list-style: none; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.mac {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 4px 12px;
  padding: 12px 12px 12px 14px; border-radius: 16px;
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--arete);
}
.mac > svg { width: 22px; height: 22px; fill: none; stroke: var(--bleu-clair); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.mac-nom { font-weight: 600; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.mac-detail { margin-top: 2px; color: var(--encre-2); font-size: 0.875rem; line-height: 1.4; }

/* La confirmation, DANS la carte du Mac. */
.confirmer { grid-column: 1 / -1; margin-top: 8px; padding: 14px; border-radius: 16px; background: rgba(255, 105, 97, 0.1); border: 1px solid rgba(255, 105, 97, 0.32); }
.confirmer p { font-weight: 600; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.confirmer small { display: block; margin-top: 2px; color: var(--encre-2); font-size: 0.875rem; line-height: 1.4; }
.confirmer div { margin-top: 12px; display: flex; gap: 8px; }
.confirmer .action { flex: 1; }

.cle-gerer { display: inline-block; margin-top: 14px; color: var(--bleu-clair); text-decoration: none; font-size: 0.9375rem; font-weight: 500; }
.cle-gerer::after { content: " ›"; }
.cle-gerer:hover { text-decoration: underline; text-underline-offset: 4px; }

.sans-cle { margin-top: 24px; align-items: center; }
.sans-cle-titre { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.02em; text-wrap: balance; }
.sans-cle .bouton { margin-top: 20px; }

.espace-lemon { margin-top: 28px; text-align: center; color: var(--encre-2); font-size: 0.9375rem; line-height: 1.5; text-wrap: pretty; }
.espace-lemon a { color: var(--bleu-clair); text-underline-offset: 3px; }

/* Messages passagers. */
.bulle {
  position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 60;
  max-width: min(92vw, 460px); padding: 12px 18px; border-radius: 16px;
  background: rgba(36, 38, 48, 0.94); border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.8);
  backdrop-filter: var(--flou); -webkit-backdrop-filter: var(--flou);
  font-size: 0.9375rem; text-align: center;
  opacity: 0; transform: translate(-50%, 12px); transition: opacity 240ms var(--sortie), transform 320ms var(--sortie);
  pointer-events: none;
}
.bulle.vue { opacity: 1; transform: translate(-50%, 0); }
.bulle.erreur { border-color: rgba(255, 105, 97, 0.5); }
.bulle:empty { display: none; }

@media (max-width: 520px) {
  .carte-compte { padding: 30px 20px 24px; border-radius: 28px; }
  .cle-carte { padding: 18px 16px 14px; }
  .cle-nom { margin-left: 0; flex-basis: 100%; }
  .cle-boite .action { flex: 1 0 100%; }
  .mac { grid-template-columns: auto minmax(0, 1fr); }
  .mac .liberer { grid-column: 2; justify-self: start; margin-top: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  .bulle { transform: translate(-50%, 0); transition: opacity 200ms ease; }
}
@media (prefers-reduced-transparency: reduce) {
  .carte-compte, .cle-carte, .bulle { background: #121624; backdrop-filter: none; -webkit-backdrop-filter: none; }
}
.compte-page .nav-compte { margin-left: auto; }

/* Les pages de texte : confidentialité, conditions. */
.doc { max-width: 760px; }
.doc-carte { text-align: left; padding: clamp(28px, 6vw, 48px); }
.doc-carte .compte-titre { font-size: clamp(1.875rem, 6vw, 2.75rem); }
.doc-date { margin-top: 10px; color: var(--encre-3); font-size: 0.875rem; }
.doc-carte > p, .doc-carte li { color: var(--encre-2); line-height: 1.6; text-wrap: pretty; }
.doc-carte > p { margin-top: 14px; }
.doc-carte h2 { margin-top: 32px; font-size: 1.25rem; font-weight: 700; letter-spacing: -0.02em; }
.doc-carte ul { margin: 10px 0 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: 6px; }
.doc-carte a { color: var(--bleu-clair); text-underline-offset: 3px; overflow-wrap: anywhere; }
