/* ── Modal connexion / inscription Aqaryoo ── */
.modal.aq-auth-modal {
  z-index: 100080 !important;
}
body:has(.aq-auth-modal.show) .modal-backdrop {
  z-index: 100070 !important;
}
body:has(.aq-auth-modal.show) .ai-assistant-root,
body:has(.aq-auth-modal.show) .ai-assistant-fab,
body:has(.aq-auth-modal.show) .ai-assistant-backdrop,
body:has(.aq-auth-modal.show) .aq-fab-ai-wrap {
  display: none !important;
}

@keyframes aqAuthModalIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes aqAuthPanelIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes aqAuthShine {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 200% 50%;
  }
}

.aq-auth-modal.show .modal-dialog {
  animation: aqAuthModalIn 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

.aq-auth-modal .modal-content {
  border: 0;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
  background: #fff;
}

.aq-auth-modal .aq-auth-header {
  position: relative;
  padding: 20px 24px 16px;
  border: 0;
  background: linear-gradient(135deg, #fff 0%, #fff8f8 55%, #fff 100%);
}

.aq-auth-modal .aq-auth-header::after {
  content: "";
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(220, 53, 69, 0.25), transparent);
}

.aq-auth-modal .modal-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #1a1f2e;
  letter-spacing: -0.02em;
  padding-right: 48px;
}

.aq-auth-modal .close-icon {
  position: absolute;
  top: 16px;
  right: 16px;
  color: #fff !important;
  background: #1a1f2e !important;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, background 0.2s ease;
  z-index: 2;
}

.aq-auth-modal .close-icon:hover {
  transform: rotate(90deg) scale(1.05);
  background: #dc3545 !important;
}

.aq-auth-modal .aq-auth-body {
  padding: 22px 24px 10px !important;
  background: #fff;
}

.aq-auth-modal .aq-auth-body > * {
  animation: aqAuthPanelIn 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

.aq-auth-modal .modal-body-heading {
  margin-top: 0 !important;
  margin-bottom: 18px;
}

.aq-auth-modal .modal-body-heading h4 {
  margin: 0 0 6px;
  font-size: 1.15rem;
  font-weight: 700;
  color: #1a1f2e;
}

.aq-auth-modal .modal-body-heading span {
  display: block;
  font-size: 0.92rem;
  color: #6b7280;
  line-height: 1.5;
}

.aq-auth-modal .form-group {
  margin-bottom: 16px;
}

.aq-auth-modal .form-group label,
.aq-auth-modal .mobile-number label {
  font-size: 0.88rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 8px;
}

.aq-auth-modal .form-group input,
.aq-auth-modal .custom-phone-input,
.aq-auth-modal .custom-phone-input input {
  width: 100%;
  border: 1.5px solid #e8ebf0 !important;
  border-radius: 12px !important;
  background: #f8fafc !important;
  color: #1a1f2e !important;
  min-height: 48px;
  padding: 10px 14px !important;
  font-size: 0.95rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.aq-auth-modal .form-group input:focus,
.aq-auth-modal .custom-phone-input:focus-within {
  border-color: #f1b6c4 !important;
  background: #fff !important;
  box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.1);
  outline: none;
}

.aq-auth-modal .password-input-container {
  position: relative;
}

.aq-auth-modal .password-input-container input {
  padding-right: 52px !important;
  width: 100%;
}

.aq-auth-modal .password-toggle-button {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  border: 0;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff5f5;
  color: #e31c23;
  padding: 0;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(227, 28, 35, 0.12);
  transition: background 0.15s ease, transform 0.15s ease;
}

.aq-auth-modal .password-toggle-button:hover,
.aq-auth-modal .password-toggle-button:focus-visible {
  background: #ffe4e4;
  color: #b91c1c;
  transform: translateY(-50%) scale(1.05);
  outline: none;
}

.aq-auth-modal .password-toggle-button svg {
  width: 18px;
  height: 18px;
}

.aq-auth-modal .continue-button,
.aq-auth-modal .register-button {
  width: 100%;
  min-height: 50px;
  border: 0;
  border-radius: 14px;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(120deg, #dc3545, #e85d6f, #dc3545);
  background-size: 200% 100%;
  box-shadow: 0 10px 24px rgba(220, 53, 69, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.aq-auth-modal .continue-button:hover:not(:disabled),
.aq-auth-modal .register-button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(220, 53, 69, 0.34);
  animation: aqAuthShine 1.8s linear infinite;
}

.aq-auth-modal .continue-button:active:not(:disabled),
.aq-auth-modal .register-button:active:not(:disabled) {
  transform: translateY(0);
}

.aq-auth-modal .continue-button:disabled,
.aq-auth-modal .register-button:disabled {
  opacity: 0.75;
}

.aq-auth-modal .google_signup {
  margin-top: 0;
}

.aq-auth-social-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

.aq-auth-panel {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.aq-auth-welcome {
  text-align: center;
  margin-bottom: 20px !important;
}

.aq-auth-welcome h4 {
  font-size: 1.2rem;
}

.aq-auth-back-link {
  text-align: center;
  margin-top: 16px;
  font-size: 0.9rem;
  color: #6b7280;
}

.aq-auth-back-link span {
  color: #dc3545;
  font-weight: 700;
  cursor: pointer;
}

.aq-auth-back-link span:hover {
  text-decoration: underline;
}

.aq-auth-phone-btn .google_signup_button {
  border-color: #dbeafe;
  background: #f8fbff;
}

.aq-auth-modal .google_signup_button {
  width: 100%;
  min-height: 48px;
  border: 1.5px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 600;
  color: #1a1f2e;
  position: relative;
  z-index: 5;
  pointer-events: auto;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.aq-auth-modal .google_signup_button:hover {
  border-color: #dc3545;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.aq-auth-modal .or_devider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 14px;
}

.aq-auth-modal .or_devider hr {
  flex: 1;
  margin: 0;
  border-color: #e5e7eb;
}

.aq-auth-modal .or_divider {
  font-size: 0.82rem;
  font-weight: 700;
  color: #9ca3af;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-transform: lowercase;
}

.aq-auth-modal .sign-up-text,
.aq-auth-modal .back-to-login {
  text-align: center;
  margin-top: 16px;
  font-size: 0.9rem;
  color: #6b7280;
}

.aq-auth-modal .sign-up,
.aq-auth-modal .back-to-login span,
.aq-auth-modal .forgot-password-link {
  color: #dc3545;
  font-weight: 700;
  cursor: pointer;
  transition: color 0.2s ease;
}

.aq-auth-modal .sign-up:hover,
.aq-auth-modal .back-to-login span:hover,
.aq-auth-modal .forgot-password-link:hover {
  color: #b02a37;
  text-decoration: underline;
}

.aq-auth-modal .forgot-password-container {
  text-align: right;
  margin: -6px 0 14px;
}

.aq-auth-modal .userInput {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 18px 0;
}

.aq-auth-modal .otp-field {
  width: 44px;
  height: 52px;
  border: 1.5px solid #e5e7eb;
  border-radius: 12px;
  text-align: center;
  font-size: 1.2rem;
  font-weight: 700;
  background: #f8fafc;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.aq-auth-modal .otp-field.focused {
  border-color: #dc3545;
  box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.12);
  transform: translateY(-2px);
}

.aq-auth-modal .aq-auth-footer {
  padding: 14px 20px 20px !important;
  border: 0;
  background: #f9fafb;
  text-align: center;
  font-size: 0.82rem;
  line-height: 1.55;
  color: #6b7280;
}

.aq-auth-modal .aq-auth-footer a {
  color: #dc3545;
  font-weight: 600;
}

.aq-auth-modal .loader-otp {
  width: 22px;
  height: 22px;
  border: 3px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.aq-recaptcha-slot,
#recaptcha-container,
#recaptcha-container-host {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  min-width: 304px;
  min-height: 78px;
  overflow: visible;
  opacity: 1;
  z-index: 100250;
  pointer-events: auto;
}

.aq-auth-modal .custom-phone-input,
.custom-phone-input {
  height: auto !important;
  min-height: 48px !important;
  display: flex !important;
  align-items: center;
  overflow: visible !important;
}

.aq-auth-modal .PhoneInputInput,
.PhoneInputInput {
  height: 48px !important;
  min-height: 48px !important;
  font-size: 16px !important;
  width: 100% !important;
}

.aq-auth-modal .userInput {
  display: flex !important;
  flex-wrap: nowrap !important;
  justify-content: space-between !important;
  gap: 6px !important;
  width: 100%;
  margin: 16px 0 10px !important;
}

.aq-auth-modal .otp-field {
  flex: 1 1 0;
  min-width: 0;
  max-width: 48px;
  width: auto !important;
  height: 48px !important;
  font-size: 16px !important;
}

body:has(.aq-auth-modal.show) .offcanvas,
body:has(.aq-auth-modal.show) .offcanvas-backdrop {
  display: none !important;
  pointer-events: none !important;
}

.aq-auth-modal {
  pointer-events: auto !important;
}

@media (max-width: 991px) {
  .navbar.header {
    position: relative !important;
  }

  .navbar.header > .container {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    min-height: 58px;
    padding-left: 12px !important;
    /* Connexion (~120) ou profil icône (44) + gap + hamburger (40) */
    padding-right: 170px !important;
  }

  html[dir="rtl"] .navbar.header > .container {
    padding-right: 12px !important;
    padding-left: 170px !important;
  }

  .header-left-section {
    position: static !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    flex: 1 1 auto !important;
    width: auto !important;
    max-width: calc(100% - 8px) !important;
    min-width: 0 !important;
    padding-right: 0 !important;
    padding-left: 0 !important;
    gap: 8px !important;
  }

  html[dir="rtl"] .header-left-section {
    padding-right: 0 !important;
    padding-left: 0 !important;
  }

  .header-left-section .brand-logo,
  .header-left-section .navbar-brand,
  .header-left-section a[href="/"],
  .header-left-section img {
    min-width: 0;
    max-width: 118px !important;
    height: auto !important;
  }

  .header-left-section .location-selector-wrapper {
    position: static !important;
    margin: 0 !important;
    width: auto !important;
    height: auto !important;
    overflow: visible !important;
  }

  .header-left-section .location-selector-button {
    display: none !important;
  }

  /* Hamburger : ancré au container, tout à droite */
  .navbar.header > .container > .header-left-section .mobile-menu-button,
  .navbar.header > .container #hamburg.mobile-menu-button,
  .navbar.header #hamburg {
    position: absolute !important;
    right: 10px !important;
    left: auto !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    z-index: 70 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    margin: 0 !important;
    border-radius: 999px !important;
    background: #fff !important;
    border: 1px solid #f0d5d5 !important;
    color: #111 !important;
    box-shadow: 0 2px 8px rgba(17, 17, 17, 0.08) !important;
  }

  html[dir="rtl"] .navbar.header #hamburg,
  html[dir="rtl"] .navbar.header .mobile-menu-button {
    right: auto !important;
    left: 10px !important;
  }

  /* Zone droite : à gauche du hamburger, largeur auto */
  .navbar.header > .container > .header-right-section,
  .navbar.header .header-right-section {
    display: flex !important;
    position: absolute !important;
    right: 56px !important;
    left: auto !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    z-index: 65 !important;
    width: auto !important;
    max-width: min(46vw, 128px) !important;
    min-width: 0 !important;
    margin: 0 !important;
    gap: 0 !important;
    pointer-events: auto !important;
    overflow: visible !important;
  }

  html[dir="rtl"] .navbar.header .header-right-section {
    right: auto !important;
    left: 56px !important;
  }

  .header-right-section .add-property-btn,
  .header-right-section .ai-header-icon-btn,
  .header-right-section .add_property,
  .header-right-section #dashboard_add {
    display: none !important;
  }

  .header-right-section .auth-section,
  .header-right-section .action-buttons-container,
  .header-right-section .aq-header-actions,
  .header-right-section .dropdown {
    display: flex !important;
    width: auto !important;
    max-width: 100% !important;
    margin: 0 !important;
  }

  /* Connexion (déconnecté) : pastille lisible avec texte complet */
  .header-right-section .auth-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
    min-height: 40px !important;
    height: 40px !important;
    padding: 0 14px 0 12px !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    border-radius: 999px !important;
    overflow: visible !important;
    pointer-events: auto !important;
    background: linear-gradient(90deg, #e85d04 0%, #f12000 100%) !important;
    color: #fff !important;
    border: 0 !important;
    box-shadow: 0 4px 12px rgba(241, 32, 0, 0.28) !important;
  }

  .header-right-section .auth-button::before {
    content: "" !important;
    display: block !important;
    width: 15px !important;
    height: 15px !important;
    flex: 0 0 15px !important;
    background: #fff !important;
    -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/><circle cx='12' cy='7' r='4'/></svg>") center / contain no-repeat !important;
    mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/><circle cx='12' cy='7' r='4'/></svg>") center / contain no-repeat !important;
  }

  /* Connecté : cercle icône seule (pas de nom tronqué) */
  .header-right-section .user-dropdown,
  .header-right-section .user-dropdown.aq-nav-btn,
  .header-right-section #dropdown-basic {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 40px !important;
    max-width: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    height: 40px !important;
    padding: 0 !important;
    font-size: 0 !important;
    line-height: 0 !important;
    border-radius: 999px !important;
    overflow: hidden !important;
    pointer-events: auto !important;
    background: linear-gradient(90deg, #e85d04 0%, #f12000 100%) !important;
    color: #fff !important;
    border: 0 !important;
    box-shadow: 0 4px 12px rgba(241, 32, 0, 0.28) !important;
  }

  .header-right-section .user-dropdown .auth-text,
  .header-right-section .user-dropdown::after,
  .header-right-section #dropdown-basic::after {
    display: none !important;
  }

  .header-right-section .user-dropdown::before {
    content: "" !important;
    display: block !important;
    width: 18px !important;
    height: 18px !important;
    flex: 0 0 18px !important;
    background: #fff !important;
    -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/><circle cx='12' cy='7' r='4'/></svg>") center / contain no-repeat !important;
    mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/><circle cx='12' cy='7' r='4'/></svg>") center / contain no-repeat !important;
  }
}

@media (max-width: 575px) {
  .aq-auth-modal .modal-dialog {
    margin: 8px;
    max-width: calc(100vw - 16px);
  }

  .aq-auth-modal .aq-auth-header {
    padding: 14px 14px 12px;
  }

  .aq-auth-modal .aq-auth-welcome {
    display: none !important;
  }

  .aq-auth-modal .aq-auth-body {
    padding: 14px 14px 8px !important;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)) !important;
    max-height: min(72dvh, 640px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .aq-auth-modal .modal-title {
    font-size: 1.15rem;
  }

  .aq-auth-modal .continue-button,
  .aq-auth-modal .register-button,
  .aq-auth-modal .google_signup_button {
    min-height: 50px;
    touch-action: manipulation;
  }

  .aq-auth-modal .form-group input,
  .aq-auth-modal .custom-phone-input input,
  .aq-auth-modal .otp-field {
    font-size: 16px !important;
  }

  .aq-auth-modal .userInput {
    gap: 5px !important;
  }

  .aq-auth-modal .otp-field {
    height: 46px !important;
  }

  .aq-auth-social-stack,
  .aq-auth-modal .google_signup {
    position: relative;
    z-index: 6;
  }

  .aq-auth-social-stack {
    gap: 8px;
  }

  .aq-auth-modal .otp-field {
    width: 40px;
    height: 48px;
  }
}

.aq-auth-feedback {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.4;
}

.aq-auth-feedback--error {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.aq-auth-feedback--success {
  background: #ecfdf3;
  color: #166534;
  border: 1px solid #bbf7d0;
}

div[data-rht-toaster],
div[data-sonner-toaster] {
  z-index: 100200 !important;
}

.aq-gmail-page {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: #fff8f8;
}

.aq-gmail-card {
  width: min(420px, 100%);
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 12px 40px rgba(185, 28, 28, 0.08);
  padding: 28px 22px 24px;
  text-align: center;
}

.aq-gmail-card h1 {
  margin: 14px 0 8px;
  font-size: 1.35rem;
  color: #1f2937;
}

.aq-gmail-card p {
  color: #4b5563;
  margin-bottom: 18px;
}

.aq-gmail-btn {
  width: 100%;
  min-height: 52px;
  border: 0;
  border-radius: 999px;
  background: #dc3545;
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  touch-action: manipulation;
}

.aq-gmail-btn:disabled {
  opacity: 0.7;
}

.aq-gmail-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #fff;
  color: #dc3545;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

.aq-gmail-gis {
  margin: 16px 0 8px;
  min-height: 44px;
  display: flex;
  justify-content: center;
}

.aq-gmail-back {
  display: inline-block;
  margin-top: 12px;
  color: #6b7280;
  font-weight: 600;
}

.aq-gmail-warn,
.aq-gmail-error {
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 14px;
  font-weight: 600;
  text-align: left;
}

.aq-gmail-warn {
  background: #fff7ed;
  color: #9a3412;
  border: 1px solid #fed7aa;
}

.aq-gmail-error {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.aq-gmail-chrome {
  display: block;
  margin-top: 8px;
  color: #b91c1c;
  font-weight: 800;
}

.aq-gmail-status {
  color: #166534 !important;
}
