:root {
  --bg: #0b0d11;
  --surface: #13161e;
  --border: #232738;
  --border2: #2d3348;
  --accent: #d4903a;
  --red: #f28080;
  --green: #4caf50;
  --text: #dde2ed;
  --text2: #9ca5bd;
  --mono: 'DM Mono', monospace;
  --sans: 'DM Sans', sans-serif;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh; min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
/* Le formulaire (main) et le footer s'empilent verticalement, centrés.
   Sans flex-direction:column, les enfants directs du body (main + footer)
   s'alignaient côte à côte → layout cassé sur Safari/iOS (formulaire à gauche,
   footer flottant à droite). */
main {
  width: 100%;
  display: flex;
  justify-content: center;
}
.card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
}
h1 { margin: 0 0 6px; font-size: 18px; }
.subtitle { color: var(--text2); font-size: 13px; margin: 0 0 22px; line-height: 1.5; }
label { display: block; font-size: 12px; color: var(--text2); margin-bottom: 6px; margin-top: 14px; text-transform: uppercase; letter-spacing: 0.5px; }
.field-hint { font-size: 11px; color: var(--text2); margin-top: 4px; font-family: var(--mono); }
input[type="text"], input[type="email"], input[type="password"] {
  width: 100%;
  padding: 11px 12px;
  background: var(--bg);
  border: 1px solid var(--border2);
  border-radius: 6px;
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
}
input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
input.invalid { border-color: var(--red); }
input.valid { border-color: var(--green); }
.field-error {
  font-size: 11px;
  color: var(--red);
  margin-top: 4px;
  line-height: 1.4;
  display: none;
}
.field-error.visible { display: block; }
input.mono { font-family: var(--mono); }
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text);
  -webkit-box-shadow: 0 0 0 1000px var(--bg) inset;
  caret-color: var(--text);
  transition: background-color 5000s ease-in-out 0s;
}
.input-row { position: relative; }
.show-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--text2);
  cursor: pointer;
  padding: 0;
  border-radius: 4px;
}
.show-toggle:hover { color: var(--accent); }
.show-toggle .icon-hide { display: none; }
.show-toggle.shown .icon-show { display: none; }
.show-toggle.shown .icon-hide { display: block; }

.strength { height: 4px; background: var(--border); border-radius: 2px; margin-top: 8px; overflow: hidden; }
.strength-bar { height: 100%; width: 0; background: var(--red); transition: width 0.2s ease, background 0.2s ease; }
.strength-bar.med  { background: #d4a13a; width: 50%; }
.strength-bar.good { background: var(--green); width: 100%; }

.btn {
  width: 100%;
  margin-top: 22px;
  padding: 11px;
  background: var(--accent);
  color: #14110d;
  border: none;
  border-radius: 6px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.msg {
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.5;
  display: none;
}
.msg.success { background: rgba(76,175,80,0.1); border-left: 3px solid var(--green); color: var(--text); display: block; }
.msg.error   { background: rgba(224,85,85,0.1); border-left: 3px solid var(--red);   color: var(--text); display: block; }
.success-box { text-align: center; }
.success-box .checkmark {
  width: 56px; height: 56px; margin: 0 auto 16px;
  border-radius: 50%; background: rgba(76,175,80,0.15);
  display: flex; align-items: center; justify-content: center;
}
.back-link {
  display: block; margin-top: 20px; text-align: center;
  color: var(--text2); text-decoration: none; font-size: 12px;
}
.back-link:hover { color: var(--accent); }

.subtitle a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.subtitle a:hover { opacity: 0.85; }

.input-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 480px) {
  .input-pair { grid-template-columns: 1fr; }
}

.lang-switch {
  position: fixed; top: 16px; right: 16px;
  font-family: var(--sans); font-size: 13px;
}
.lang-switch select {
  background: var(--surface); border: 1px solid var(--border2); color: var(--text);
  padding: 6px 28px 6px 10px; border-radius: 6px; cursor: pointer;
  font-family: inherit; font-size: inherit;
  appearance: none; -webkit-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--text2) 50%),
    linear-gradient(135deg, var(--text2) 50%, transparent 50%);
  background-position: calc(100% - 12px) 50%, calc(100% - 8px) 50%;
  background-size: 4px 4px, 4px 4px;
  background-repeat: no-repeat;
}
.lang-switch select:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }

/* Wave G — S5 — barre de force à 5 tiers (zxcvbn score 0..4) */
.strength-bar.tier-0 { background: var(--red);    width: 20%; }
.strength-bar.tier-1 { background: #d46a3a;       width: 40%; }
.strength-bar.tier-2 { background: #d4a13a;       width: 60%; }
.strength-bar.tier-3 { background: #7ac74f;       width: 80%; }
.strength-bar.tier-4 { background: var(--green);  width: 100%; }

/* ── Ex-attributs style="…" (SEC-4) : un attribut inline → une classe. Les deux :not(#_) donnent à la règle la spécificité d'un double ID, pour battre les règles #id comme le faisait l'attribut inline. ── */
.u-6b99de:not(#_):not(#_) { display:none; }
.u-8bd7aa:not(#_):not(#_) { display:block;text-align:center;text-decoration:none; }
.u-3ff172:not(#_):not(#_) { margin:28px auto 8px;text-align:center;font-family:'DM Mono',monospace;font-size:11px;color:var(--text2);letter-spacing:0.3px; }
.u-ae3c16:not(#_):not(#_) { color:var(--accent);text-decoration:none; }

/* Mention d'acceptation des conditions (sous le bouton d'inscription). */
.signup_legal-note { margin: 14px 0 0; font-size: 12px; line-height: 1.5; color: var(--text2); text-align: center; }
.signup_legal-note a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
