/* Anthony IT Solutions, Espace client (login / inscription) */

:root {
  --auth-brand: #163a72;
  --auth-brand-dark: #0f2744;
  --auth-brand-light: #1e4a8f;
  --auth-accent: #2563eb;
  --auth-text: #0f172a;
  --auth-muted: #64748b;
  --auth-border: rgba(22, 58, 114, 0.14);
  --auth-surface: #ffffff;
  --auth-surface-soft: #f8fafc;
  --auth-panel-bg: linear-gradient(135deg, #eef3f9 0%, #e2eaf4 100%);
  --auth-error-bg: #fef2f2;
  --auth-error-border: #fecaca;
  --auth-error-text: #b91c1c;
  --auth-success-bg: #ecfdf5;
  --auth-success-border: #a7f3d0;
  --auth-success-text: #047857;
  --auth-shadow: 0 10px 40px -10px rgba(15, 39, 68, 0.12);
  --auth-radius: 16px;
}

[data-theme="dark"],
[data-style="dark"] {
  --auth-text: #f1f5f9;
  --auth-muted: #94a3b8;
  --auth-border: rgba(148, 163, 184, 0.22);
  --auth-surface: #111827;
  --auth-surface-soft: #0f172a;
  --auth-panel-bg: #020617;
  --auth-error-bg: rgba(127, 29, 29, 0.35);
  --auth-error-border: rgba(248, 113, 113, 0.35);
  --auth-error-text: #fecaca;
  --auth-success-bg: rgba(6, 78, 59, 0.35);
  --auth-success-border: rgba(52, 211, 153, 0.35);
  --auth-success-text: #a7f3d0;
  --auth-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
}

body.ais-auth-page {
  overflow: auto !important;
  background: var(--auth-panel-bg) !important;
  color: var(--auth-text);
}

/* ========= Layout ========= */
.ais-auth-page-root {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

.ais-auth-controls {
  position: fixed;
  top: 20px;
  right: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 120;
}

.ais-auth-control-btn {
  background: var(--auth-surface);
  border: 1px solid var(--auth-border);
  color: var(--auth-muted);
  height: 40px;
  min-width: 40px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
  box-shadow: 0 2px 8px rgba(15, 39, 68, 0.06);
  text-decoration: none;
}

.ais-auth-control-btn:hover {
  border-color: var(--auth-brand);
  color: var(--auth-brand);
}

.ais-auth-control-btn span {
  display: none;
}

@media (min-width: 576px) {
  .ais-auth-control-btn span {
    display: inline;
  }
}

/* ========= Brand panel ========= */
.ais-auth-brand {
  width: min(480px, 42vw);
  flex-shrink: 0;
  background: linear-gradient(165deg, var(--auth-brand) 0%, var(--auth-brand-dark) 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(32px, 4vw, 48px);
  position: relative;
  overflow: hidden;
}

.ais-auth-brand::before,
.ais-auth-brand::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.ais-auth-brand::before {
  top: -90px;
  right: -90px;
  width: 280px;
  height: 280px;
  background: rgba(255, 255, 255, 0.07);
}

.ais-auth-brand::after {
  bottom: -70px;
  left: -70px;
  width: 220px;
  height: 220px;
  background: rgba(255, 255, 255, 0.05);
}

.ais-auth-brand-inner {
  position: relative;
  z-index: 1;
}

.ais-auth-brand-logo {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 14px;
  margin-bottom: 40px;
}

.ais-auth-brand-logo-box {
  width: 54px;
  height: 54px;
  flex-shrink: 0;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ais-auth-brand-logo-box img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  display: block;
}

.ais-auth-brand-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  min-width: 0;
}

.ais-auth-brand-logo-text strong {
  font-size: 17px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.01em;
}

.ais-auth-brand-logo-text > span {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6);
}

.ais-auth-brand h2 {
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
  color: #fff;
}

.ais-auth-brand-desc {
  font-size: 15px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.78);
  margin: 0 0 32px;
  max-width: 36ch;
}

.ais-auth-features {
  display: grid;
  gap: 10px;
}

.ais-auth-feature {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
}

.ais-auth-feature i {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ais-auth-brand-footer {
  position: relative;
  z-index: 1;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.72);
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.ais-auth-brand-footer a {
  color: rgba(255, 255, 255, 0.92);
  font-weight: 600;
  text-decoration: none;
}

.ais-auth-brand-footer a:hover {
  text-decoration: underline;
}

/* ========= Form panel ========= */
.ais-auth-form-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(24px, 4vw, 48px);
  background: var(--auth-panel-bg);
}

.ais-auth-card {
  width: 100%;
  max-width: 460px;
  background: var(--auth-surface);
  border: 1px solid var(--auth-border);
  border-top: 4px solid var(--auth-brand);
  border-radius: calc(var(--auth-radius) + 4px);
  padding: clamp(28px, 4vw, 44px);
  box-shadow: var(--auth-shadow);
}

.ais-auth-card--wide {
  max-width: 780px;
}

.ais-auth-card-head {
  text-align: center;
  margin-bottom: 28px;
}

.ais-auth-card-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 18px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--auth-brand) 0%, var(--auth-brand-dark) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 24px;
  box-shadow: 0 8px 22px rgba(15, 39, 68, 0.28);
}

.ais-auth-card-head h1 {
  font-size: clamp(22px, 2.2vw, 26px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
  color: var(--auth-text);
}

.ais-auth-card-head p {
  margin: 0;
  font-size: 14px;
  color: var(--auth-muted);
  line-height: 1.5;
}

/* ========= Alerts ========= */
.ais-auth-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
  margin-bottom: 20px;
}

.ais-auth-alert i {
  flex-shrink: 0;
  margin-top: 1px;
}

.ais-auth-alert--error {
  background: var(--auth-error-bg);
  border: 1px solid var(--auth-error-border);
  color: var(--auth-error-text);
}

.ais-auth-alert--success {
  background: var(--auth-success-bg);
  border: 1px solid var(--auth-success-border);
  color: var(--auth-success-text);
}

.ais-auth-loading {
  text-align: center;
  padding: 28px 0;
  color: var(--auth-muted);
  font-size: 14px;
}

/* ========= Fields ========= */
.ais-auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ais-auth-fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.ais-auth-fieldset legend {
  display: block;
  width: 100%;
  font-size: 13px;
  font-weight: 600;
  color: var(--auth-text);
  margin-bottom: 8px;
  padding: 0;
}

.ais-auth-segment {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 4px;
  border-radius: 12px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
}

.ais-auth-segment__btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--auth-muted);
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 9px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.ais-auth-segment__btn i {
  font-size: 12px;
  opacity: 0.85;
}

.ais-auth-segment__btn:hover {
  color: var(--auth-text);
}

.ais-auth-segment__btn.is-active {
  background: #fff;
  color: var(--auth-brand);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08), 0 0 0 1px rgba(15, 39, 68, 0.06);
}

.ais-auth-segment__btn.is-disabled,
.ais-auth-segment__btn:disabled,
.ais-auth-segment__btn[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed !important;
  color: var(--auth-muted);
  box-shadow: none;
}

.ais-auth-segment__btn.is-disabled *,
.ais-auth-segment__btn:disabled *,
.ais-auth-segment__btn[aria-disabled="true"] * {
  cursor: not-allowed !important;
}

.ais-auth-segment__btn.is-disabled:hover,
.ais-auth-segment__btn:disabled:hover,
.ais-auth-segment__btn[aria-disabled="true"]:hover {
  color: var(--auth-muted);
  cursor: not-allowed !important;
}

.ais-auth-hint--error {
  color: #b91c1c;
  font-weight: 600;
}

.ais-auth-company-card {
  border: 1px solid #c7e0ff;
  background: linear-gradient(180deg, #f8fbff 0%, #eef6ff 100%);
  border-radius: 12px;
  padding: 14px 14px 12px;
}

.ais-auth-company-card__head {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #0f766e;
  margin-bottom: 10px;
  font-size: 13px;
}

.ais-auth-company-card__head i {
  font-size: 15px;
}

.ais-auth-company-card__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 14px;
  margin: 0;
}

.ais-auth-company-card__grid dt {
  font-size: 11px;
  font-weight: 700;
  color: var(--auth-muted);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin: 0 0 2px;
}

.ais-auth-company-card__grid dd {
  margin: 0;
  font-size: 13px;
  font-weight: 650;
  color: var(--auth-text);
  word-break: break-word;
}

.ais-auth-company-card__grid > div:first-child {
  grid-column: 1 / -1;
}

.ais-auth-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.ais-auth-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--auth-text);
  margin-bottom: 6px;
}

.ais-auth-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.ais-auth-label-row label {
  margin-bottom: 0;
}

.ais-auth-input-wrap {
  position: relative;
}

.ais-auth-input-wrap > i:first-child {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  color: var(--auth-muted);
  pointer-events: none;
  z-index: 1;
}

.ais-auth-input-wrap input {
  width: 100%;
  height: 48px;
  padding: 0 44px;
  font-size: 14px;
  font-family: inherit;
  color: var(--auth-text);
  background: var(--auth-surface-soft);
  border: 1.5px solid var(--auth-border);
  border-radius: 12px;
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.ais-auth-input-wrap input::placeholder {
  color: var(--auth-muted);
}

.ais-auth-input-wrap input:focus {
  border-color: var(--auth-brand);
  box-shadow: 0 0 0 4px rgba(22, 58, 114, 0.12);
}

.ais-auth-input-wrap:focus-within > i:first-child {
  color: var(--auth-brand);
}

.ais-auth-toggle-pwd {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--auth-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ais-auth-toggle-pwd:hover {
  color: var(--auth-brand);
  background: rgba(22, 58, 114, 0.06);
}

.ais-auth-hint {
  font-size: 13px;
  color: var(--auth-muted);
  line-height: 1.5;
  margin: 0 0 4px;
}

.ais-auth-hint strong {
  color: var(--auth-text);
  font-weight: 600;
}

.ais-auth-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--auth-brand);
  text-decoration: none;
}

.ais-auth-link:hover {
  text-decoration: underline;
}

.ais-auth-submit {
  width: 100%;
  margin-top: 4px;
  padding: 14px 18px;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  color: #fff;
  background: linear-gradient(135deg, var(--auth-brand) 0%, var(--auth-brand-dark) 100%);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: transform 150ms ease, box-shadow 150ms ease, opacity 150ms ease;
  box-shadow: 0 6px 18px rgba(15, 39, 68, 0.28);
}

.ais-auth-submit:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(15, 39, 68, 0.34);
}

.ais-auth-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.ais-auth-secondary {
  width: 100%;
  margin-top: 10px;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  color: var(--auth-brand);
  background: var(--auth-surface-soft);
  border: 1.5px solid var(--auth-border);
  border-radius: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: border-color 150ms ease, background 150ms ease, color 150ms ease;
}

.ais-auth-secondary:hover:not(:disabled) {
  background: rgba(22, 58, 114, 0.06);
  border-color: rgba(22, 58, 114, 0.35);
  color: var(--auth-brand-dark);
}

.ais-auth-secondary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.ais-auth-input-wrap input.ais-auth-code-input {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.35em;
  text-align: center;
  padding-left: 16px;
  padding-right: 16px;
}

.ais-auth-input-wrap:has(.ais-auth-code-input) > i:first-child {
  display: none;
}

.ais-auth-footer-links {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--auth-border);
  text-align: center;
  font-size: 14px;
  color: var(--auth-muted);
  line-height: 1.6;
}

.ais-auth-footer-links a {
  color: var(--auth-brand);
  font-weight: 600;
  text-decoration: none;
}

.ais-auth-footer-links a:hover {
  text-decoration: underline;
}

.ais-auth-secure {
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--auth-muted);
}

.ais-auth-secure i {
  color: #10b981;
}

.ais-auth-terms {
  font-size: 12px;
  color: var(--auth-muted);
  line-height: 1.5;
  text-align: center;
}

.ais-auth-terms a {
  color: var(--auth-brand);
  font-weight: 600;
  text-decoration: none;
}

.ais-auth-terms a:hover {
  text-decoration: underline;
}

/* Autofill */
body.ais-auth-page input:-webkit-autofill,
body.ais-auth-page input:-webkit-autofill:hover,
body.ais-auth-page input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 30px var(--auth-surface-soft) inset !important;
  -webkit-text-fill-color: var(--auth-text) !important;
}

/* ========= Responsive ========= */
@media (max-width: 991.98px) {
  .ais-auth-brand {
    display: none;
  }

  .ais-auth-form-panel {
    align-items: flex-end;
    padding: 0;
    background: linear-gradient(165deg, var(--auth-brand) 0%, var(--auth-brand-dark) 100%);
  }

  [data-theme="dark"] .ais-auth-form-panel,
  [data-style="dark"] .ais-auth-form-panel {
    background: linear-gradient(175deg, #020617, #0f172a);
  }

  .ais-auth-controls {
    top: 16px;
    right: 16px;
  }

  .ais-auth-control-btn {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.22);
    color: #fff;
  }

  .ais-auth-control-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
  }

  .ais-auth-card {
    max-width: 100%;
    min-height: 86vh;
    border: none;
    border-radius: 28px 28px 0 0;
    padding: 36px 22px 28px;
    box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.18);
  }

  .ais-auth-card::before {
    content: "";
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 44px;
    height: 4px;
    border-radius: 999px;
    background: var(--auth-border);
  }

  .ais-auth-form-panel {
    position: relative;
  }

  .ais-auth-card {
    position: relative;
  }

  .ais-auth-card-icon {
    width: 72px;
    height: 72px;
    margin-top: -72px;
    border: 5px solid var(--auth-surface);
  }

  .ais-auth-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .ais-auth-card-head h1 {
    font-size: 22px;
  }

  .ais-auth-input-wrap input {
    height: 50px;
    font-size: 16px;
  }

  .ais-auth-submit {
    min-height: 50px;
    font-size: 16px;
  }
}

/* ========= Champ honeypot (anti-spam), invisible mais présent ========= */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* ========= Sélecteur de pays / téléphone (custom) ========= */
.ais-auth-cc {
  position: relative;
}

.ais-auth-cc-trigger {
  width: 100%;
  height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  font-size: 14px;
  font-family: inherit;
  color: var(--auth-text);
  background: var(--auth-surface-soft);
  border: 1.5px solid var(--auth-border);
  border-radius: 12px;
  cursor: pointer;
  text-align: left;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.ais-auth-cc-trigger:focus,
.ais-auth-cc.is-open .ais-auth-cc-trigger {
  outline: none;
  border-color: var(--auth-brand);
  box-shadow: 0 0 0 4px rgba(22, 58, 114, 0.12);
}

.ais-auth-cc-flag {
  width: 22px;
  height: 16px;
  border-radius: 3px;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.ais-auth-cc-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ais-auth-cc-dial {
  color: var(--auth-muted);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.ais-auth-cc-caret {
  color: var(--auth-muted);
  font-size: 12px;
  transition: transform 150ms ease;
}

.ais-auth-cc.is-open .ais-auth-cc-caret {
  transform: rotate(180deg);
}

.ais-auth-cc-menu {
  position: absolute;
  z-index: 40;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--auth-surface);
  border: 1px solid var(--auth-border);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 290px;
}

.ais-auth-cc-search {
  padding: 10px;
  border-bottom: 1px solid var(--auth-border);
}

.ais-auth-cc-search input {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  font-size: 13.5px;
  font-family: inherit;
  color: var(--auth-text);
  background: var(--auth-surface-soft);
  border: 1.5px solid var(--auth-border);
  border-radius: 9px;
  outline: none;
}

.ais-auth-cc-search input:focus {
  border-color: var(--auth-brand);
}

.ais-auth-cc-list {
  overflow-y: auto;
  padding: 6px;
}

.ais-auth-cc-option {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  font-size: 13.5px;
  font-family: inherit;
  color: var(--auth-text);
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
}

.ais-auth-cc-option:hover,
.ais-auth-cc-option.is-active {
  background: rgba(22, 58, 114, 0.08);
}

.ais-auth-cc-option .ais-auth-cc-name {
  flex: 1;
}

.ais-auth-cc-empty {
  padding: 16px;
  text-align: center;
  font-size: 13px;
  color: var(--auth-muted);
}

/* Téléphone : indicatif (dial) + numéro */
.ais-auth-phone {
  display: flex;
  gap: 8px;
}

.ais-auth-phone .ais-auth-cc {
  flex: 0 0 124px;
}

.ais-auth-phone .ais-auth-cc-menu {
  width: 300px;
}

.ais-auth-phone .ais-auth-input-wrap {
  flex: 1;
}

[data-theme="dark"] .ais-auth-cc-option:hover,
[data-theme="dark"] .ais-auth-cc-option.is-active,
[data-style="dark"] .ais-auth-cc-option:hover,
[data-style="dark"] .ais-auth-cc-option.is-active {
  background: rgba(148, 163, 184, 0.14);
}

[data-theme="dark"] .ais-auth-cc-menu,
[data-style="dark"] .ais-auth-cc-menu {
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}

/* ========= Autocomplétion d'adresse ========= */
.ais-auth-ac {
  position: relative;
}

.ais-auth-ac-spin {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  color: var(--auth-muted);
}

.ais-auth-ac-menu {
  position: absolute;
  z-index: 40;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--auth-surface);
  border: 1px solid var(--auth-border);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
  overflow: hidden;
  padding: 6px;
  max-height: 260px;
  overflow-y: auto;
}

.ais-auth-ac-option {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  font-size: 13.5px;
  font-family: inherit;
  color: var(--auth-text);
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  line-height: 1.35;
}

.ais-auth-ac-option i {
  color: var(--auth-brand);
  font-size: 12px;
  flex-shrink: 0;
}

.ais-auth-ac-option:hover {
  background: rgba(22, 58, 114, 0.08);
}

[data-theme="dark"] .ais-auth-ac-option i,
[data-style="dark"] .ais-auth-ac-option i {
  color: #8aa4cc;
}

[data-theme="dark"] .ais-auth-ac-option:hover,
[data-style="dark"] .ais-auth-ac-option:hover {
  background: rgba(148, 163, 184, 0.14);
}

[data-theme="dark"] .ais-auth-ac-menu,
[data-style="dark"] .ais-auth-ac-menu {
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}

/* Modal contact global (layout marketing) */
.dedie-quote-modal {
  --dedie-quote-brand: #163a72;
  --dedie-quote-brand-hover: #1e4a8f;
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.dedie-quote-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.dedie-quote-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
}

.dedie-quote-dialog {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  max-height: min(92vh, 720px);
  overflow-y: auto;
  background: #fff;
  border-radius: 18px;
  padding: 1.35rem 1.5rem 1.5rem;
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.22);
  border: 1px solid #e2e8f0;
}

.dedie-quote-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid #e2e8f0;
}

.dedie-quote-header-text {
  min-width: 0;
  flex: 1;
}

.dedie-quote-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--dedie-quote-brand);
  margin-bottom: 0.35rem;
}

.dedie-quote-kicker i {
  font-size: 0.95rem;
  line-height: 1;
}

.dedie-quote-close i,
.dedie-quote-btn i {
  font-size: 1rem;
  line-height: 1;
  width: auto;
  height: auto;
  background: none;
  border-radius: 0;
  font-style: normal;
}

.dedie-quote-btn .ti-spin {
  animation: dedie-quote-spin 0.85s linear infinite;
}

@keyframes dedie-quote-spin {
  to {
    transform: rotate(360deg);
  }
}

.dedie-quote-dialog h3 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
}

.dedie-quote-close {
  flex-shrink: 0;
  width: var(--ais-touch-min, 44px);
  height: var(--ais-touch-min, 44px);
  border: none;
  border-radius: 10px;
  background: #f1f5f9;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dedie-quote-close:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.dedie-quote-offer {
  margin-bottom: 1.1rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: linear-gradient(135deg, #f8fafc 0%, #e8eef6 100%);
  border: 1px solid #dce6f2;
}

.dedie-quote-offer.is-collapsed {
  display: none;
}

.dedie-quote-offer-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 0.35rem;
}

.dedie-quote-offer-name {
  font-size: 0.95rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.35;
  margin-bottom: 0.35rem;
}

.dedie-quote-offer-specs {
  font-size: 0.82rem;
  color: #475569;
  line-height: 1.5;
  word-break: break-word;
}

.dedie-quote-field {
  margin-bottom: 0.85rem;
}

.dedie-quote-field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: #475569;
  margin-bottom: 0.35rem;
}

.dedie-quote-field label span {
  color: #ef4444;
}

.dedie-quote-field input,
.dedie-quote-field textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  font-size: 0.95rem;
  color: #0f172a;
  background: #fff;
  box-sizing: border-box;
}

.dedie-quote-field input:focus,
.dedie-quote-field textarea:focus {
  outline: none;
  border-color: #163a72;
  box-shadow: 0 0 0 3px rgba(22, 58, 114, 0.15);
}

.dedie-quote-field textarea {
  resize: vertical;
  min-height: 100px;
}

.dedie-quote-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.dedie-quote-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.5rem;
}

.dedie-quote-btn {
  flex: 1 1 auto;
  min-height: 46px;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  font-family: inherit;
  line-height: 1.2;
}

.dedie-quote-btn--ghost {
  background: #fff;
  color: #475569;
  border: 1px solid #cbd5e1;
}

.dedie-quote-btn--ghost:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #0f172a;
}

.dedie-quote-btn--primary {
  flex: 1.4 1 160px;
  background: var(--dedie-quote-brand);
  color: #fff;
  border: none;
  box-shadow: 0 4px 14px rgba(22, 58, 114, 0.28);
}

.dedie-quote-btn--primary:hover {
  background: var(--dedie-quote-brand-hover);
}

.dedie-quote-btn--primary:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.dedie-quote-feedback {
  margin: 0.5rem 0 0;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.45;
}

.dedie-quote-feedback.is-success {
  color: #16a34a;
}

.dedie-quote-feedback.is-error {
  color: #dc2626;
}


/* ========= Mobile auth refresh ========= */
.ais-auth-mobile-hero {
  display: none;
}

@media (max-width: 991.98px) {
  .ais-auth-page-root {
    min-height: 100dvh;
  }

  .ais-auth-controls {
    top: calc(env(safe-area-inset-top, 0px) + 14px);
    right: 14px;
    left: 14px;
    justify-content: space-between;
    pointer-events: none;
  }

  .ais-auth-controls > * {
    pointer-events: auto;
  }

  .ais-auth-form-panel {
    display: block;
    padding: calc(env(safe-area-inset-top, 0px) + 76px) 14px calc(env(safe-area-inset-bottom, 0px) + 24px);
    background: linear-gradient(180deg, #163a72 0%, #12315f 220px, #edf3f9 220px, #edf3f9 100%);
  }

  [data-theme="dark"] .ais-auth-form-panel,
  [data-style="dark"] .ais-auth-form-panel {
    background: linear-gradient(180deg, #020617 0%, #0f172a 220px, #020617 220px, #020617 100%);
  }

  .ais-auth-mobile-hero {
    display: grid;
    gap: 14px;
    margin: 0 auto 16px;
    max-width: 720px;
    color: #fff;
  }

  .ais-auth-mobile-hero__brand {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .ais-auth-mobile-hero__logo {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.14);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
    flex-shrink: 0;
  }

  .ais-auth-mobile-hero__logo img {
    width: 32px;
    height: 32px;
    object-fit: contain;
  }

  .ais-auth-mobile-hero__brand strong {
    display: block;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.2;
  }

  .ais-auth-mobile-hero__brand span {
    display: block;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.78);
  }

  .ais-auth-mobile-hero h2 {
    margin: 0;
    font-size: clamp(26px, 7vw, 34px);
    font-weight: 800;
    line-height: 1.05;
    color: #fff;
  }

  .ais-auth-mobile-hero p {
    margin: -4px 0 0;
    max-width: 34ch;
    font-size: 14px;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.82);
  }

  .ais-auth-mobile-hero__perks {
    display: none !important;
  }

  .ais-auth-mobile-hero {
    gap: 10px;
    margin-bottom: 12px;
  }

  .ais-auth-mobile-hero__perks span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 12px;
    font-weight: 700;
  }

  .ais-auth-card {
    max-width: 720px;
    min-height: auto;
    margin: 0 auto;
    border: 1px solid var(--auth-border);
    border-top: 4px solid var(--auth-brand);
    border-radius: 24px;
    padding: 22px 18px 20px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
  }

  .ais-auth-card::before {
    display: none;
  }

  .ais-auth-card-head {
    display: none;
  }

  .ais-auth-card-icon {
    width: 52px;
    height: 52px;
    margin: 0 0 14px;
    border: none;
    box-shadow: 0 8px 18px rgba(15, 39, 68, 0.22);
    font-size: 20px;
  }

  .ais-auth-card-head h1 {
    font-size: 24px;
    line-height: 1.1;
    margin-bottom: 8px;
  }

  .ais-auth-card-head p {
    font-size: 14px;
    line-height: 1.55;
  }

  .ais-auth-form {
    gap: 14px;
  }

  .ais-auth-field label,
  .ais-auth-link,
  .ais-auth-hint,
  .ais-auth-footer-links {
    font-size: 13px;
  }

  .ais-auth-label-row {
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 6px 12px;
  }

  .ais-auth-phone {
    flex-direction: column;
    gap: 10px;
  }

  .ais-auth-phone .ais-auth-cc,
  .ais-auth-phone .ais-auth-input-wrap {
    flex: 1 1 auto;
    width: 100%;
  }

  .ais-auth-phone .ais-auth-cc-menu {
    width: 100%;
    max-width: 100%;
  }

  .ais-auth-cc-menu,
  .ais-auth-ac-menu {
    max-width: calc(100vw - 28px);
  }

  .ais-auth-input-wrap input,
  .ais-auth-cc-trigger {
    min-height: 50px;
  }

  .ais-auth-submit,
  .ais-auth-secondary {
    min-height: 50px;
  }

  .ais-auth-footer-links,
  .ais-auth-secure {
    text-align: left;
    justify-content: flex-start;
  }
}

@media (max-width: 575.98px) {
  .ais-auth-control-btn span {
    display: inline;
  }

  .ais-auth-control-btn {
    min-width: auto;
    padding: 0 12px;
  }
}

@media (max-width: 420px) {
  .ais-auth-form-panel {
    padding-left: 10px;
    padding-right: 10px;
  }

  .ais-auth-card {
    padding: 20px 14px 18px;
  }

  .ais-auth-mobile-hero h2 {
    font-size: 24px;
  }

  .ais-auth-mobile-hero__perks span {
    width: 100%;
    justify-content: center;
  }
}

/* ============================================================
   Sélecteur de langue sur les pages d'authentification
   (ais-header.css n'est pas chargé ici : styles autonomes)
   ============================================================ */
.ais-auth-controls .ais-lang-select {
  position: relative;
}

.ais-auth-controls .ais-lang-select__trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--auth-surface);
  border: 1px solid var(--auth-border);
  color: var(--auth-muted);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(15, 39, 68, 0.06);
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}

.ais-auth-controls .ais-lang-select__trigger:hover {
  border-color: var(--auth-brand);
  color: var(--auth-brand);
}

.ais-auth-controls .ais-lang-select__flag,
.ais-auth-controls .ais-lang-select__option .fi {
  width: 18px;
  height: 13px;
  border-radius: 2px;
  flex-shrink: 0;
}

.ais-auth-controls .ais-lang-select__caret {
  font-size: 11px;
  opacity: 0.6;
}

.ais-auth-controls .ais-lang-select__menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 190px;
  margin: 0;
  padding: 6px;
  list-style: none;
  border-radius: 14px;
  background: var(--auth-surface);
  border: 1px solid var(--auth-border);
  box-shadow: 0 18px 40px rgba(15, 39, 68, 0.16);
  z-index: 140;
}

.ais-auth-controls .ais-lang-select__option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--auth-text);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.ais-auth-controls .ais-lang-select__option:hover {
  background: rgba(22, 58, 114, 0.08);
}

.ais-auth-controls .ais-lang-select__option.is-active {
  color: var(--auth-brand);
}

.ais-auth-controls .ais-lang-select__option i {
  margin-left: auto;
  font-size: 12px;
}

/* Sur mobile, les commandes passent sur le panneau bleu */
@media (max-width: 900px) {
  .ais-auth-controls .ais-lang-select__trigger {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.22);
    color: #fff;
  }

  .ais-auth-controls .ais-lang-select__trigger:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
  }
}
