:root {
  color-scheme: dark;
  --bg: #030b16;
  --panel: rgba(8, 18, 35, .8);
  --text: #f4f7ff;
  --muted: #9cb2ca;
  --subtle: #8aa1ba;
  --orange: #ff9f1c;
  --gold: #ffbf47;
  --green: #41f28a;
  --red: #ff6b6b;
  --border: rgba(160, 190, 225, .14);
}
* { box-sizing: border-box; }
html { min-height: 100%; }
body {
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
  isolation: isolate;
  color: var(--text);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(20, 70, 130, .55), transparent 55%),
    radial-gradient(ellipse at 50% 42%, rgba(255, 159, 28, .07), transparent 46%),
    linear-gradient(180deg, #030b16 0%, #07182d 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.ambient {
  position: fixed;
  z-index: -1;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(85px);
  opacity: .38;
  animation: ambient-drift 13s ease-in-out infinite alternate;
}
.ambient-purple {
  width: 360px; height: 360px; left: -180px; top: 18%;
  background: rgba(255, 159, 28, .30);
}
.ambient-blue {
  width: 420px; height: 420px; right: -240px; bottom: 0;
  background: rgba(30, 110, 210, .30);
  animation-delay: -5s;
}
.starfield {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .25;
  background-image: radial-gradient(rgba(255, 236, 190, .8) .7px, transparent .9px);
  background-size: 74px 74px;
  mask-image: linear-gradient(to bottom, transparent, #000 15%, #000 80%, transparent);
}
.topbar {
  width: min(1180px, calc(100% - 56px));
  margin: 0 auto;
  min-height: 92px;
  display: flex; align-items: center; justify-content: space-between;
  position: relative; z-index: 1;
}
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.brand-logo { width: 44px; height: 44px; border-radius: 60%; object-fit: cover; box-shadow: 0 0 26px rgba(255, 159, 28, .28); }
.brand-name { font-size: 17px; line-height: 1.25; font-weight: 800; letter-spacing: -.5px; }
.brand-name strong { display: block; color: #ffb02e; font-size: 14px; letter-spacing: .1px; }
.topbar-note { display: flex; align-items: center; gap: 9px; color: #9cb2ca; font-size: 12px; font-weight: 500; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #41f28a; box-shadow: 0 0 12px rgba(65, 242, 138, .7); }
.page-content { flex: 1; display: grid; place-items: center; padding: 22px 20px 36px; }
.auth-card {
  width: min(100%, 510px);
  padding: 25px 38px 30px;
  position: relative;
  border: 1px solid var(--border);
  border-radius: 25px;
  text-align: center;
  background: linear-gradient(145deg, rgba(9, 22, 42, .9), rgba(4, 12, 26, .93));
  box-shadow: 0 28px 90px rgba(0, 0, 0, .36), 0 0 70px rgba(255, 159, 28, .07), inset 0 1px 0 rgba(255,255,255,.045);
  backdrop-filter: blur(20px);
  animation: card-in .7s cubic-bezier(.2,.8,.2,1) both;
}
.auth-card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: linear-gradient(135deg, rgba(255, 159, 28, .5), transparent 32%, transparent 67%, rgba(65, 242, 138, .28));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none;
}
.card-topline { display: flex; justify-content: space-between; align-items: center; color: #7f98b3; font-size: 10px; font-weight: 800; letter-spacing: 2px; }
.tiny-lock { color: #ffbf47; font-size: 18px; }
.logo-frame { width: 96px; height: 96px; margin: 20px auto 24px; position: relative; }
.main-logo { width: 100%; height: 100%; display: block; object-fit: cover; border-radius: 50%; box-shadow: 0 0 38px rgba(255, 159, 28, .30); }
.eyebrow { display: flex; justify-content: center; align-items: center; gap: 9px; color: #ffbf47; font-size: 10px; letter-spacing: 1.8px; font-weight: 800; }
.eyebrow-line { width: 18px; height: 1px; background: linear-gradient(90deg, transparent, #ff9f1c); }
h1 { margin: 14px 0 12px; font-size: clamp(30px, 5vw, 39px); line-height: 1.12; letter-spacing: -1.7px; font-weight: 800; }
h1 span { background: linear-gradient(95deg, #ffd35e 8%, #ff9f1c 58%, #ffbf47); -webkit-background-clip: text; background-clip: text; color: transparent; }
.intro { max-width: 370px; margin: 0 auto 24px; color: var(--muted); font-size: 13px; line-height: 1.8; }
.permission-panel {
  display: flex; gap: 13px; align-items: flex-start; text-align: left;
  margin: 0 0 20px; padding: 15px;
  border: 1px solid rgba(255, 191, 71, .16); border-radius: 16px;
  background: rgba(3, 11, 22, .5);
}
.discord-mark { width: 35px; height: 35px; flex: 0 0 35px; display: grid; place-items: center; border-radius: 12px; background: linear-gradient(140deg, #5865f2, #4752c4); box-shadow: 0 5px 18px rgba(88, 101, 242, .2); }
.discord-mark svg { width: 21px; fill: white; }
.permission-copy strong { display: block; margin: 1px 0 5px; font-size: 12px; font-weight: 700; }
.permission-copy p { margin: 0; color: #a9bdd2; font-size: 12px; line-height: 1.65; }
.permission-copy a { display: inline-block; margin-top: 7px; color: #ffbf47; font-size: 11px; text-decoration: none; }
.permission-copy a:hover { color: #ffd98a; text-decoration: underline; }
.primary-button {
  /* Couleurs du bouton : change seulement ces 4 lignes */
  --btn-1: #ff8a00; --btn-2: #ff9f1c; --btn-3: #ffc43d;
  --btn-glow: 255, 159, 28;
  --btn-ink: #1b1205; /* couleur du texte et des icônes */
  position: relative; overflow: hidden; isolation: isolate;
  width: 100%; min-height: 58px; display: flex; align-items: center; gap: 12px;
  padding: 14px 15px 14px 15px; border: 1px solid rgba(255,255,255,.34); border-radius: 16px;
  color: var(--btn-ink); font: inherit; font-size: 14px; font-weight: 700; letter-spacing: .1px; cursor: pointer;
  background:
    linear-gradient(180deg, rgba(255,255,255,.28) 0%, rgba(255,255,255,0) 55%),
    linear-gradient(105deg, var(--btn-1) 0%, var(--btn-2) 52%, var(--btn-3) 100%);
  box-shadow: 0 12px 30px rgba(var(--btn-glow), .34), 0 1px 0 rgba(255,255,255,.22) inset, 0 -1px 0 rgba(0,0,0,.18) inset;
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}
/* reflet qui passe au survol */
.primary-button::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.2) 50%, transparent 65%);
  transform: translateX(-120%); transition: transform .6s ease;
}
.primary-button:hover { transform: translateY(-2px); filter: brightness(1.06); box-shadow: 0 16px 36px rgba(var(--btn-glow), .46), 0 1px 0 rgba(255,255,255,.26) inset, 0 -1px 0 rgba(0,0,0,.18) inset; }
.primary-button:hover::before { transform: translateX(120%); }
.primary-button:active { transform: translateY(0); filter: brightness(.97); }
.primary-button:focus-visible { outline: 3px solid #ffd98a; outline-offset: 4px; }
.primary-button:disabled { cursor: wait; filter: saturate(.8); transform: none; }
.primary-button:disabled::before { display: none; }

/* icône et flèche : même taille de chaque côté, le texte reste vraiment centré */
.button-discord, .button-arrow {
  flex: none; width: 30px; height: 30px; display: grid; place-items: center;
  border-radius: 10px; background: rgba(27, 18, 5, .12);
}
.button-discord svg { width: 18px; height: 18px; fill: var(--btn-ink); display: block; }
.button-arrow { font-size: 16px; font-weight: 600; margin-left: 0; opacity: 1; transition: transform .2s ease, background .2s ease; }
.primary-button:hover .button-arrow { transform: translate(2px, -2px); background: rgba(27, 18, 5, .2); }
.button-label { flex: 1; text-align: center; }
.button-label:first-child { padding-left: 42px; } /* boutons sans icône (success, error) */

/* chargement : la flèche devient un petit cercle qui tourne */
.primary-button[aria-busy="true"] .button-arrow { color: transparent; position: relative; }
.primary-button[aria-busy="true"] .button-arrow::after {
  content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(27, 18, 5, .25); border-top-color: var(--btn-ink); animation: btn-spin .8s linear infinite;
}
@keyframes btn-spin { to { transform: rotate(360deg); } }
.fine-print { display: flex; justify-content: center; align-items: center; gap: 7px; margin: 15px 0 0; color: #8aa1ba; font-size: 11px; line-height: 1.5; }
.mini-shield { color: #ffbf47; font-size: 10px; }
.bottom-bar { display: flex; align-items: center; justify-content: center; gap: 26px; padding: 0 20px 27px; }
.feature { display: flex; align-items: center; gap: 10px; min-width: 130px; }
.feature-icon { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid rgba(255, 159, 28, .22); border-radius: 12px; background: rgba(255, 159, 28, .08); color: #ffbf47; font-size: 17px; }
.feature strong, .feature small { display: block; }
.feature strong { color: #dbe6f3; font-size: 11px; font-weight: 700; }
.feature small { margin-top: 3px; color: #8aa1ba; font-size: 10px; }
.footer-divider { width: 1px; height: 29px; background: rgba(160, 190, 225, .14); }
@keyframes card-in { from { opacity: 0; transform: translateY(12px) scale(.99); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes ambient-drift { from { transform: translate3d(0, -10px, 0); } to { transform: translate3d(28px, 22px, 0); } }
@media (max-width: 600px) {
  .topbar { width: calc(100% - 32px); min-height: 75px; }
  .topbar-note { font-size: 10px; }
  .page-content { padding: 16px 15px 28px; }
  .auth-card { padding: 21px 21px 24px; border-radius: 22px; }
  .logo-frame { width: 80px; height: 80px; margin: 17px auto 21px; }
  .main-logo { border-radius: 50%; }
  h1 { letter-spacing: -1.2px; }
  .intro { font-size: 12px; margin-bottom: 20px; }
  .permission-panel { padding: 12px; }
  .bottom-bar { gap: 12px; flex-wrap: wrap; padding: 0 12px 20px; }
  .feature { min-width: 0; gap: 7px; }
  .feature-icon { width: 29px; height: 29px; }
  .feature small { display: none; }
  .footer-divider { height: 23px; }
}
@media (max-width: 370px) {
  .topbar-note { display: none; }
  .bottom-bar { gap: 10px; }
  .feature { gap: 5px; }
  .feature strong { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

.topbar-actions { display: flex; align-items: center; gap: 20px; }
.language-switch {
  display: inline-flex; align-items: center; gap: 2px; padding: 3px;
  border: 1px solid rgba(160, 190, 225, .18); border-radius: 11px;
  background: rgba(6, 16, 32, .75);
}
.language-switch button {
  min-width: 38px; min-height: 32px; padding: 0 9px; border: 0; border-radius: 8px;
  background: transparent; color: #8aa1ba;
  font: inherit; font-size: 11px; font-weight: 800; letter-spacing: .5px; cursor: pointer;
  transition: color .2s ease, background .2s ease;
}
.language-switch button:hover { color: #ffbf47; }
.language-switch button[aria-pressed="true"] { color: #fff; background: rgba(255, 159, 28, .24); }
.language-switch button:focus-visible, .brand:focus-visible, .permission-copy a:focus-visible { outline: 2px solid #ffd98a; outline-offset: 2px; }
.lang-separator { display: none; }
a.primary-button { text-decoration: none; }
.login-status { margin: 12px 0 0; color: #fda4af; font-size: 12px; line-height: 1.5; }
.auth-card.success .tiny-lock { color: #41f28a; }
.auth-card.error .tiny-lock { color: #ff6b6b; }
@media (max-width: 600px) {
  .topbar-actions { gap: 10px; }
  .language-switch button { min-width: 36px; min-height: 36px; }
}