/* Modal connexion Prowash */
.pe-login-modal {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .25s ease, visibility .25s ease;
}
.pe-login-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.pe-login-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 45, 111, .55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.pe-login-modal__dialog {
  position: relative;
  width: 100%;
  max-width: 440px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: #fff;
  border-radius: 24px;
  border: 1px solid rgba(20, 45, 111, .1);
  box-shadow: 0 32px 80px rgba(20, 45, 111, .22);
  transform: translateY(16px) scale(.98);
  transition: transform .3s cubic-bezier(.22, 1, .36, 1);
}
.pe-login-modal__loading {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  border-radius: inherit;
}
.pe-login-modal__loading[hidden] {
  display: none !important;
}
.pe-login-modal__loading-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}
.pe-login-modal__spinner {
  width: 42px;
  height: 42px;
  border: 3px solid rgba(20, 45, 111, .14);
  border-top-color: #142D6F;
  border-radius: 50%;
  animation: pe-login-modal-spin .75s linear infinite;
}
.pe-login-modal__loading-text {
  margin: 0;
  max-width: 240px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
  color: #142D6F;
}
@keyframes pe-login-modal-spin {
  to { transform: rotate(360deg); }
}
.pe-login-modal--loading .pe-login-modal__close {
  opacity: .45;
  pointer-events: none;
  cursor: default;
}
.pe-login-modal--loading .pe-login-modal__body,
.pe-login-modal--loading .pe-login-modal__head {
  pointer-events: none;
  user-select: none;
}
.pe-login-modal.is-open .pe-login-modal__dialog {
  transform: translateY(0) scale(1);
}
.pe-login-modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 28px 28px 0;
}
.pe-login-modal__head-text h2 {
  margin: 0 0 6px;
  font-size: clamp(22px, 4vw, 26px);
  color: #142D6F;
  line-height: 1.2;
}
.pe-login-modal__head-text p {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: #6b7a99;
}
.pe-login-modal__close {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 12px;
  background: #F6F4EF;
  color: #142D6F;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s, color .2s;
}
.pe-login-modal__close:hover {
  background: #A3BDFF;
}
.pe-login-modal__body {
  padding: 24px 28px 28px;
}
.pe-login-modal__google {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 20px;
  border-radius: 12px;
  border: 1px solid rgba(20, 45, 111, .15);
  background: #fff;
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  color: #142D6F;
  cursor: pointer;
  transition: background .2s, border-color .2s, box-shadow .2s;
}
.pe-login-modal__google img {
  flex-shrink: 0;
  display: block;
}
.pe-login-modal__google:hover {
  background: #F6F4EF;
  border-color: rgba(20, 45, 111, .25);
  box-shadow: 0 4px 16px rgba(20, 45, 111, .08);
}
.pe-login-modal__google:focus-visible {
  outline: none;
  border-color: #142D6F;
  box-shadow: 0 0 0 3px rgba(163, 189, 255, .45);
}
.pe-login-modal__or {
  position: relative;
  text-align: center;
  margin: 22px 0;
}
.pe-login-modal__or span {
  position: relative;
  z-index: 1;
  display: inline-block;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #8a96ad;
  background: #fff;
}
.pe-login-modal__or::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: rgba(20, 45, 111, .12);
}
.pe-login-modal__field {
  margin-bottom: 18px;
}
.pe-login-modal__field label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #142D6F;
  margin-bottom: 8px;
}
.pe-login-modal__field label .req { color: #c0392b; }
.pe-login-modal__input-wrap {
  position: relative;
}
.pe-login-modal__field input {
  width: 100%;
  border: 1px solid rgba(20, 45, 111, .15);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 16px;
  font-family: inherit;
  color: #142D6F;
  background: #fff;
  transition: border-color .2s, box-shadow .2s;
}
.pe-login-modal__field input:focus {
  outline: none;
  border-color: #142D6F;
  box-shadow: 0 0 0 3px rgba(163, 189, 255, .45);
}
.pe-login-modal__field input::placeholder { color: #8a96ad; }
.pe-login-modal__field--password input {
  padding-right: 48px;
}
.pe-login-modal__toggle-pwd {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  color: #6b7a99;
  font-size: 20px;
  cursor: pointer;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color .2s, background .2s;
}
.pe-login-modal__toggle-pwd:hover {
  color: #142D6F;
  background: #F6F4EF;
}
.pe-login-modal__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 22px;
  font-size: 14px;
}
.pe-login-modal__remember {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #6b7a99;
  cursor: pointer;
  margin: 0;
}
.pe-login-modal__remember input {
  width: 18px;
  height: 18px;
  accent-color: #142D6F;
  cursor: pointer;
}
.pe-login-modal__forgot {
  color: #142D6F;
  font-weight: 600;
  text-decoration: none;
}
.pe-login-modal__forgot:hover { text-decoration: underline; }
.pe-login-modal__submit {
  width: 100%;
  border: none;
  border-radius: 12px;
  padding: 16px 24px;
  font-size: 17px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  color: #fff;
  background: #142D6F;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background .25s, transform .2s;
}
.pe-login-modal__submit:hover {
  background: #0f2459;
  transform: translateY(-1px);
  color: #fff;
}
.pe-login-modal__foot {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid rgba(20, 45, 111, .08);
  text-align: center;
  font-size: 14px;
  color: #6b7a99;
  line-height: 1.5;
}
.pe-login-modal__foot a {
  color: #142D6F;
  font-weight: 600;
  text-decoration: none;
}
.pe-login-modal__foot a:hover { text-decoration: underline; }
.pe-login-modal__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 16px;
  margin-top: 14px;
}
.pe-login-modal__links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #142D6F;
  text-decoration: none;
}
.pe-login-modal__links a:hover { text-decoration: underline; }
body.pe-login-modal-open {
  overflow: hidden;
}

.pe-login-modal__alert {
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(220, 53, 69, 0.1);
  border: 1px solid rgba(220, 53, 69, 0.35);
  color: #842029;
  font-size: 14px;
  line-height: 1.45;
}

.pe-login-modal__alert--success {
  background: rgba(25, 135, 84, 0.12);
  border-color: rgba(25, 135, 84, 0.4);
  color: #0f5132;
}

.pe-login-modal__submit:disabled {
  opacity: 0.72;
  cursor: wait;
}

.pe-login-modal__logged-in-text {
  margin: 0 0 12px;
  font-size: 16px;
  line-height: 1.55;
  color: #142D6F;
  font-weight: 600;
}

.pe-login-modal__logged-in-hint {
  margin: 0 0 20px;
  font-size: 14px;
  line-height: 1.5;
  color: #6b7a99;
}

.pe-login-modal__space-link {
  display: flex;
  width: 100%;
  justify-content: center;
  text-decoration: none;
  margin-bottom: 12px;
}

.pe-login-modal__logout-link {
  display: block;
  text-align: center;
  font-size: 14px;
  color: #6b7a99;
}

.pe-login-modal--logged-in .pe-login-modal__alert[data-pe-login-success] {
  margin-bottom: 16px;
}

.pe-space-connected {
  font-weight: 500;
}

/* Inscription — modal large */
.pe-register-modal__dialog {
  max-width: min(920px, calc(100vw - 32px));
}

.pe-register-modal__body {
  padding-left: 28px;
  padding-right: 28px;
  padding-bottom: 28px;
}

.pe-register-modal .pe-login-modal__head {
  padding: 24px 28px 0;
}

.pe-register-form__row {
  display: grid;
  gap: 14px 16px;
  margin-bottom: 0;
}

.pe-register-form__row--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pe-register-form__row .pe-login-modal__field {
  margin-bottom: 14px;
}

.pe-register-form .pe-login-modal__submit {
  width: 100%;
  margin-top: 4px;
}

.pe-register-modal .pe-login-modal__google {
  width: 100%;
}

@media (max-width: 640px) {
  .pe-register-modal__dialog {
    max-width: calc(100vw - 24px);
  }

  .pe-register-modal__body,
  .pe-register-modal .pe-login-modal__head {
    padding-left: 20px;
    padding-right: 20px;
  }

  .pe-register-form__row--2 {
    grid-template-columns: 1fr;
  }
}

.pe-register-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  padding: 4px;
  background: #eef2f8;
  border-radius: 10px;
}

.pe-register-modal .pe-login-modal__or {
  margin: 18px 0;
}

.pe-register-tabs__btn {
  flex: 1;
  border: none;
  background: transparent;
  color: #4a5568;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.pe-register-tabs__btn.is-active {
  background: #fff;
  color: #1a365d;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.pe-register-tabs__btn:focus-visible {
  outline: 2px solid #3182ce;
  outline-offset: 2px;
}

.pe-register-panel[hidden] {
  display: none !important;
}

.pe-register-search {
  position: relative;
}

.pe-register-search__results {
  position: absolute;
  z-index: 5;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  max-height: 220px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #d8dee9;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.pe-register-search__item {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  background: #fff;
  padding: 10px 12px;
  cursor: pointer;
  border-bottom: 1px solid #eef2f8;
}

.pe-register-search__item:last-child {
  border-bottom: none;
}

.pe-register-search__item:hover,
.pe-register-search__item:focus-visible {
  background: #f0f7ff;
}

.pe-register-search__item-name {
  display: block;
  font-weight: 600;
  font-size: 14px;
  color: #1a202c;
}

.pe-register-search__item-meta,
.pe-register-search__item-addr {
  display: block;
  font-size: 12px;
  color: #64748b;
  margin-top: 2px;
}

.pe-register-search__empty {
  margin: 0;
  padding: 12px;
  font-size: 13px;
  color: #64748b;
}

.pe-register-selected {
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #f0fdf4;
  border: 1px solid #86efac;
}

.pe-register-selected__label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #166534;
  font-weight: 600;
}

.pe-register-selected__name {
  font-size: 15px;
  font-weight: 600;
  color: #14532d;
  margin-top: 4px;
}

.pe-register-selected__addr {
  font-size: 13px;
  color: #166534;
  margin-top: 2px;
}

.pe-register-selected__change {
  margin-top: 8px;
  border: none;
  background: none;
  color: #2563eb;
  font-size: 13px;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}

.pe-register-tos {
  display: block;
  margin: 12px 0 16px;
}
