/* HSBCnet login — démo de mise en page */

:root {
  --hsbc-red: #db0011;
  --link-blue: #0070ba;
  --text-primary: #333333;
  --text-muted: #767676;
  --footer-bg: #1c2126;
  --header-bg: #1a1a1a;
  --help-pink: #d80073;
  --overlay: rgba(15, 22, 32, 0.72);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  font-family: "Univers Next", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  color: var(--text-primary);
  background: var(--footer-bg);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Header */
.site-header {
  position: relative;
  z-index: 20;
  background: var(--header-bg);
  padding: 0.65rem 1.75rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: #fff;
}

.brand__text {
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.brand__mark {
  display: block;
}

/* Zone principale + fond */
.main-region {
  position: relative;
  min-height: calc(100vh - 52px);
  padding: 2.5rem 1.25rem 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

#login-form {
  display: contents;
}

.login-error {
  position: relative;
  z-index: 15;
  margin: 0 1rem 1rem;
  padding: 0.65rem 1rem;
  max-width: 900px;
  width: 100%;
  background: #fff3f3;
  border: 1px solid var(--hsbc-red);
  color: var(--text-primary);
  text-align: center;
  font-size: 0.95rem;
}

.backdrop {
  position: absolute;
  inset: 0;
  background:
    var(--overlay)
    url("assets/background.jpg") center / cover no-repeat;
  z-index: 0;
}

.login-modal {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 900px;
  background: #fff;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
  padding: 2rem 2.25rem 0;
}

.login-modal__title {
  margin: 0 0 1.75rem;
  font-size: 1.65rem;
  font-weight: 400;
  color: var(--text-primary);
}

.login-modal__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem 3rem;
  padding-bottom: 1.75rem;
}

@media (max-width: 768px) {
  .login-modal__grid {
    grid-template-columns: 1fr;
  }
}

.field-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.text-input {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid #555;
  font-size: 1rem;
  font-family: inherit;
  margin-bottom: 0.85rem;
  border-radius: 0;
}

.text-input:focus {
  outline: 2px solid var(--link-blue);
  outline-offset: 1px;
}

.login-form {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.link {
  color: var(--link-blue);
  text-decoration: underline;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.link:hover {
  text-decoration: none;
}

.link--standalone {
  margin-bottom: 1.1rem;
}

.link__icon {
  flex-shrink: 0;
  display: block;
}

.security-panel__content {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.security-panel__heading {
  margin: 0 0 0.65rem;
  font-size: 1rem;
  font-weight: 700;
}

.security-panel__para {
  margin: 0 0 1rem;
  font-size: 0.88rem;
  color: var(--text-primary);
  line-height: 1.5;
}

.security-panel__illu {
  flex-shrink: 0;
  margin-left: auto;
}

.login-modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1.25rem 0 1.5rem;
  border-top: 1px solid #ddd;
  margin: 0 -2.25rem;
  padding-left: 2.25rem;
  padding-right: 2.25rem;
}

.btn {
  font-family: inherit;
  font-size: 0.95rem;
  padding: 0.55rem 1.35rem;
  cursor: pointer;
  border-radius: 0;
  min-width: 7rem;
}

.btn--secondary {
  margin-right: auto;
  background: #fff;
  border: 1px solid #000;
  color: #000;
}

.btn--secondary:hover {
  background: #f5f5f5;
}

.btn--primary {
  background: #fff;
  border: 1px solid #c8c8c8;
  color: #c8c8c8;
}

.btn--primary:not(:disabled) {
  border-color: #000;
  color: #000;
}

.btn--primary:not(:disabled):hover {
  background: #f5f5f5;
}

.btn--primary:disabled {
  cursor: not-allowed;
}

/* Onglet aide */
.help-tab {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 100;
}

.help-tab__btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 1rem 0.35rem 1.25rem;
  background: var(--help-pink);
  border: none;
  cursor: pointer;
  color: #fff;
  box-shadow: -2px 0 8px rgba(0, 0, 0, 0.15);
}

.help-tab__btn:hover {
  filter: brightness(1.05);
}

.help-tab__q {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1;
}

.help-tab__label {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* Pied de page */
.site-footer {
  background: var(--footer-bg);
  color: #c5c5c5;
  padding: 1.75rem 1.5rem 2rem;
  font-size: 0.8rem;
}

.site-footer__inner {
  max-width: 1100px;
  margin: 0 auto;
}

.footer-links-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2.5rem;
  margin-bottom: 1.25rem;
}

.footer-icon-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: #fff;
  text-decoration: none;
  font-size: 0.85rem;
}

.footer-icon-link:hover {
  text-decoration: underline;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.85rem;
  margin-bottom: 1rem;
}

.footer-legal a {
  color: #b8c2cc;
  text-decoration: none;
  white-space: nowrap;
}

.footer-legal a:hover {
  text-decoration: underline;
}

.footer-legal__cn {
  color: #b8c2cc;
}

.footer-disclaimer {
  margin: 0;
  font-size: 0.7rem;
  line-height: 1.55;
  color: var(--text-muted);
  max-width: 100%;
}

@media (max-width: 768px) {
  .login-modal__footer {
    flex-wrap: wrap;
  }

  .btn--secondary {
    margin-right: 0;
    width: 100%;
  }

  .btn--primary {
    width: 100%;
  }
}
