
/* ARES AUTH SIGNATURE V3 */

html body #dlg-auth.dialogue-auth {
  position: fixed !important;
  inset: 0 !important;
  display: none;
  box-sizing: border-box !important;
  width: 100% !important;
  height: 100dvh !important;
  max-width: none !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 24px !important;
  border: none !important;
  border-radius: 0 !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  color: #f4f6ff !important;
  background:
    radial-gradient(ellipse at 50% 0%,
      rgba(40,83,170,.22),transparent 55%),
    #090e1d !important;
  box-shadow: none !important;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

#dlg-auth[open] {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
}

#dlg-auth::backdrop {
  background: #090e1d !important;
}

#dlg-auth [hidden] {
  display: none !important;
}

#dlg-auth .auth-entete {
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  flex: none !important;
  gap: 14px !important;
  width: 100% !important;
  max-width: 390px !important;
  margin: 0 auto !important;
  padding: 56px 0 28px !important;
  border: none !important;
  background: transparent !important;
  text-align: center !important;
}

#dlg-auth .auth-logo {
  display: grid !important;
  place-items: center !important;
  width: 82px !important;
  height: 82px !important;
  flex: 0 0 82px !important;
  margin: 0 auto !important;
  border-radius: 50% !important;
  background: rgba(64,109,204,.10) !important;
  box-shadow: 0 0 45px rgba(61,115,225,.14) !important;
}

#dlg-auth .auth-logo img {
  width: 78px !important;
  height: 78px !important;
  object-fit: contain !important;
}

#dlg-auth .auth-entete > div {
  width: 100%;
  min-width: 0;
}

#dlg-auth #auth-titre {
  margin: 0 0 8px !important;
  color: #f5f7ff !important;
  font-size: clamp(23px,5.8vw,29px) !important;
  line-height: 1.2 !important;
  letter-spacing: -.035em;
  text-align: center !important;
}

#dlg-auth .auth-entete p {
  margin: 0 !important;
  color: #9daed0 !important;
  font-size: 13px !important;
  line-height: 1.5 !important;
  text-align: center !important;
}

#dlg-auth #auth-fermer {
  position: fixed !important;
  top: 18px !important;
  right: 20px !important;
  z-index: 10 !important;
  display: grid !important;
  place-items: center !important;
  width: 38px !important;
  height: 38px !important;
  border: 1px solid #334364 !important;
  border-radius: 50% !important;
  color: #cbd7ee !important;
  background: #151f37 !important;
  box-shadow: none !important;
}

#dlg-auth .onglets-auth {
  display: none !important;
}

#dlg-auth .ares-oauth-choices {
  order: 1 !important;
  box-sizing: border-box !important;
  flex: none !important;
  width: 100% !important;
  max-width: 390px !important;
  margin: 0 auto 18px !important;
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
}

#dlg-auth .ares-oauth-grid {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 10px !important;
}

#dlg-auth .ares-oauth-provider {
  box-sizing: border-box !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 48px !important;
  width: 100% !important;
  padding: 11px 15px !important;
  border: 1px solid #344463 !important;
  border-radius: 13px !important;
  background: #16223a !important;
  color: #f1f5ff !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  box-shadow: none !important;
}

#dlg-auth .ares-oauth-provider:disabled {
  display: none !important;
}

#dlg-auth .ares-oauth-agree {
  display: none !important;
}

#dlg-auth .ares-oauth-message {
  color: #a7b7d6 !important;
  font-size: 12px !important;
}

#dlg-auth .ares-auth-divider {
  order: 2 !important;
  display: flex;
  align-items: center;
  gap: 14px;
  box-sizing: border-box;
  width: 100%;
  max-width: 390px;
  margin: 0 auto 20px;
  color: #8294b7;
  font-size: 12px;
  white-space: nowrap;
}

#dlg-auth .ares-auth-divider::before,
#dlg-auth .ares-auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #293754;
}

#dlg-auth #form-connexion,
#dlg-auth #form-inscription {
  order: 3 !important;
  box-sizing: border-box !important;
  flex: none !important;
  width: 100% !important;
  max-width: 390px !important;
  margin: 0 auto !important;
  padding: 0 !important;
  gap: 15px !important;
  background: transparent !important;
}

#dlg-auth .formulaire > label:not(.case) {
  display: flex !important;
  flex-direction: column !important;
  gap: 7px !important;
  color: #b8c5df !important;
  font-size: 12px !important;
  font-weight: 600 !important;
}

#dlg-auth .formulaire input:not([type="checkbox"]) {
  box-sizing: border-box !important;
  width: 100% !important;
  height: 48px !important;
  min-height: 48px !important;
  padding: 0 14px !important;
  border: 1px solid #314160 !important;
  border-radius: 12px !important;
  background: #080e1e !important;
  color: #fff !important;
  font-size: 16px !important;
  outline: none !important;
  box-shadow: none !important;
}

#dlg-auth .formulaire input:not([type="checkbox"]):focus {
  border-color: #5996ff !important;
  box-shadow: 0 0 0 3px rgba(74,135,255,.13) !important;
}

#dlg-auth .formulaire .case {
  display: flex !important;
  align-items: flex-start !important;
  gap: 10px !important;
  color: #a6b6d4 !important;
  font-size: 12px !important;
  line-height: 1.5 !important;
}

#dlg-auth .formulaire .case input {
  flex: 0 0 17px !important;
  width: 17px !important;
  height: 17px !important;
  margin: 1px 0 0 !important;
  accent-color: #488bff !important;
}

#dlg-auth .formulaire small {
  color: #8c9cba !important;
  font-size: 11px !important;
}

#dlg-auth .formulaire .btn-principal {
  width: 100% !important;
  min-height: 49px !important;
  border: none !important;
  border-radius: 13px !important;
  background: linear-gradient(120deg,#60a1ff,#3478f6) !important;
  color: #fff !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  box-shadow: 0 6px 24px rgba(42,111,239,.16) !important;
}

#dlg-auth .ares-auth-switch {
  order: 4 !important;
  box-sizing: border-box;
  width: 100%;
  max-width: 390px;
  margin: 20px auto 0;
  color: #9aabc9;
  font-size: 13px;
  text-align: center;
}

#dlg-auth .ares-auth-switch button {
  padding: 7px;
  border: 0;
  color: #86b6ff;
  background: transparent;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

#dlg-auth .auth-note {
  order: 5 !important;
  max-width: 390px;
  color: #92a4c4;
}

#dlg-auth .ares-auth-footer {
  order: 6 !important;
  box-sizing: border-box;
  width: 100%;
  max-width: 390px;
  margin: auto auto 0;
  padding: 30px 0 24px;
  color: #8294b5;
  font-size: 11px;
  text-align: center;
}

#dlg-auth .ares-auth-footer strong {
  color: #c3d2f0;
}

@media (max-width: 600px) {
  #dlg-auth .auth-entete {
    padding-top: 42px !important;
    padding-bottom: 22px !important;
  }
}

@media (prefers-reduced-motion: no-preference) {
  #dlg-auth .ares-auth-switch button,
  #dlg-auth .formulaire .btn-principal {
    transition: opacity .18s ease, transform .18s ease;
  }
  #dlg-auth .formulaire .btn-principal:active {
    transform: scale(.99);
  }
}


/* ARES AUTH V3.1 PREMIUM POLISH */

#dlg-auth #auth-fermer,
#dlg-auth #auth-fermer:focus {
  outline: none !important;
  outline-offset: 0 !important;
  box-shadow: none !important;
}

@media (hover: none) and (pointer: coarse) {
  #dlg-auth #auth-fermer:focus-visible {
    outline: none !important;
    box-shadow: none !important;
  }
}

@media (hover: hover) and (pointer: fine) {
  #dlg-auth #auth-fermer:focus-visible {
    outline: 2px solid #9bbcff !important;
    outline-offset: 3px !important;
  }
}

#dlg-auth .ares-auth-password-wrap {
  position: relative;
  display: block;
  width: 100%;
}

#dlg-auth .ares-auth-password-wrap input {
  padding-right: 54px !important;
}

#dlg-auth .ares-auth-eye {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #a9bbdc;
  cursor: pointer;
}

#dlg-auth .ares-auth-eye svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#dlg-auth .ares-auth-eye:focus-visible {
  outline: 2px solid #9bbcff;
  outline-offset: 1px;
}

#dlg-auth .ares-auth-field-error {
  display: block;
  margin-top: 5px;
  color: #ff9da9;
  font-size: 11px;
  line-height: 1.45;
}

#dlg-auth .ares-auth-field-error[hidden] {
  display: none !important;
}

#dlg-auth input[aria-invalid="true"] {
  border-color: #e57b92 !important;
}

#dlg-auth .ares-auth-strength {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

#dlg-auth .ares-auth-strength-track {
  height: 4px;
  overflow: hidden;
  border-radius: 99px;
  background: #26334e;
}

#dlg-auth .ares-auth-strength-fill {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: #ed8c8c;
  transition: width .2s ease, background .2s ease;
}

#dlg-auth .ares-auth-strength[data-level="2"] .ares-auth-strength-fill {
  background: #e8b76e;
}

#dlg-auth .ares-auth-strength[data-level="3"] .ares-auth-strength-fill {
  background: #79c7a0;
}

#dlg-auth .ares-auth-strength-text {
  color: #9bacca;
  font-size: 11px;
}

#dlg-auth .ares-auth-strength[hidden] {
  display: none !important;
}

#dlg-auth .formulaire button[type="submit"]:disabled {
  opacity: .76;
  cursor: progress;
}

#dlg-auth .ares-auth-loading {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
}

#dlg-auth .ares-auth-spinner {
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255,255,255,.35);
  border-top-color: white;
  border-radius: 50%;
  animation: ares-auth-spin .7s linear infinite;
}

@keyframes ares-auth-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  #dlg-auth .ares-auth-spinner {
    animation: none;
    border-color: white;
  }
}

/* ARES AUTH V3.2 — APPLE FINISH */

/* Autoremplissage Safari / Chrome */
#dlg-auth input:-webkit-autofill,
#dlg-auth input:-webkit-autofill:hover,
#dlg-auth input:-webkit-autofill:focus {
  -webkit-text-fill-color: #f4f7ff !important;
  -webkit-box-shadow:
    0 0 0 1000px #080f22 inset !important;
  box-shadow:
    0 0 0 1000px #080f22 inset !important;
  caret-color: #f4f7ff !important;
  border-color: #34466d !important;
  transition: background-color 9999s ease-out 0s;
}

/* Champs premium */
#dlg-auth .formulaire input:not([type="checkbox"]) {
  box-sizing: border-box !important;
  min-height: 54px;
  font-size: 16px !important;
  color: #f4f7ff !important;
  background-color: #080f22 !important;
  border: 1px solid #34466d !important;
  border-radius: 15px !important;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
  transition:
    border-color .2s ease,
    box-shadow .2s ease;
}

#dlg-auth .formulaire input:not([type="checkbox"]):focus {
  outline: none !important;
  border-color: #6099ff !important;
  box-shadow:
    0 0 0 3px rgba(80,140,255,.15) !important;
}

/* Boutons */
#dlg-auth .btn-principal {
  transition:
    transform .18s ease,
    filter .18s ease,
    box-shadow .18s ease;
}

#dlg-auth .btn-principal:active:not(:disabled) {
  transform: scale(.985);
}

#dlg-auth .btn-principal:disabled {
  opacity: .65;
  cursor: wait;
}

/* iPhone : éviter les zooms automatiques */
@media (max-width: 600px) {
  #dlg-auth input,
  #dlg-auth select,
  #dlg-auth textarea {
    font-size: 16px !important;
  }
}

/* Accessibilité */
@media (prefers-reduced-motion: reduce) {
  #dlg-auth *,
  #dlg-auth *::before,
  #dlg-auth *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}


/* ARES AUTH V3.2.1 — BLACK EDITION */

/* Champs noirs, même avec Safari et iCloud */
#dlg-auth input:not([type="checkbox"]),
#dlg-auth input:not([type="checkbox"]):focus,
#dlg-auth input:not([type="checkbox"]):active,
#dlg-auth input:not([type="checkbox"]):-webkit-autofill,
#dlg-auth input:not([type="checkbox"]):-webkit-autofill:hover,
#dlg-auth input:not([type="checkbox"]):-webkit-autofill:focus,
#dlg-auth input:not([type="checkbox"]):-webkit-autofill:active {
  background: #05070d !important;
  background-color: #05070d !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  caret-color: #ffffff !important;
  -webkit-box-shadow: 0 0 0 1000px #05070d inset !important;
  box-shadow: 0 0 0 1000px #05070d inset !important;
  border: 1px solid #344365 !important;
  border-radius: 15px !important;
}

/* Focus élégant */
#dlg-auth input:not([type="checkbox"]):focus,
#dlg-auth input:not([type="checkbox"]):-webkit-autofill:focus {
  outline: none !important;
  border-color: #5795ff !important;
  box-shadow:
    0 0 0 1000px #05070d inset,
    0 0 0 2px rgba(87,149,255,.28) !important;
}

/* Texte et placeholder */
#dlg-auth input::placeholder {
  color: #77849d !important;
  -webkit-text-fill-color: #77849d !important;
}


/* ARES Auth V4.1 — OAuth consent */
#dlg-auth .ares-oauth-consent-v4 {
  display: flex !important;
  align-items: flex-start !important;
  gap: 10px !important;
  margin: 14px 0 5px !important;
  color: #aebbd2 !important;
  font-size: 12px !important;
  line-height: 1.55 !important;
  cursor: pointer;
}

#dlg-auth .ares-oauth-consent-v4 input {
  appearance: auto !important;
  -webkit-appearance: checkbox !important;
  width: 16px !important;
  height: 16px !important;
  min-width: 16px !important;
  margin: 2px 0 0 !important;
  accent-color: #7289ff !important;
  cursor: pointer;
}

#dlg-auth .ares-oauth-consent-v4 span {
  flex: 1;
}

#dlg-auth .ares-oauth-provider[data-provider="discord"] {
  background: #5865f2 !important;
  border-color: #6975ff !important;
  color: #ffffff !important;
  font-weight: 700 !important;
}

#dlg-auth .ares-oauth-provider[data-provider="discord"]:hover {
  background: #4752c4 !important;
}

#dlg-auth .ares-oauth-message {
  min-height: 0 !important;
  margin-top: 8px !important;
}

/* ARES Auth V4.4 — Masquer le consentement OAuth redondant */
#dlg-auth .ares-oauth-consent-v4,
#dlg-auth .ares-oauth-agree {
  display: none !important;
}
