/* =========================================================
   Athath Auth Popup – popup.css
   Brand palette : #0f3535 / #1a8080 / #1c2e2e / #152626
   Font          : Poppins (via Astra theme)
   ========================================================= */

/* ── Variables ── */
:root {
  --athath-teal-dark   : #0f3535;
  --athath-teal        : #1a8080;
  --athath-teal-mid    : #1c2e2e;
  --athath-teal-deep   : #152626;
  --athath-white       : #ffffff;
  --athath-gray-100    : #f8f9fa;
  --athath-gray-200    : #e9ecef;
  --athath-gray-400    : #adb5bd;
  --athath-gray-600    : #6c757d;
  --athath-gray-800    : #343a40;
  --athath-error       : #e74c3c;
  --athath-success     : #2ecc71;
  --athath-radius      : 6px;
  --athath-shadow      : 0 20px 60px rgba(0,0,0,.25);
  --athath-transition  : .22s ease;
}

/* ── Overlay (élément <dialog> natif : on neutralise son style par défaut) ── */
.athath-overlay {
  border         : none;
  margin         : 0;
  width          : 100%;
  height         : 100%;
  max-width      : 100vw;
  max-height     : 100vh;
  color          : inherit;

  position       : fixed;
  inset          : 0;
  background     : rgba(0, 0, 0, .55);
  backdrop-filter: blur(3px);
  z-index        : 99999;
  display        : none;
  align-items    : center;
  justify-content: center;
  padding        : 16px;
  opacity        : 0;
  visibility     : hidden;
  transition     : opacity var(--athath-transition),
                   visibility var(--athath-transition);
}
/* dialog[open] passe en display:block par défaut ; on force le flex de centrage */
.athath-overlay[open] {
  display: flex;
}
/* on gère déjà l'assombrissement sur l'élément lui-même : le ::backdrop natif reste transparent */
.athath-overlay::backdrop {
  background: transparent;
}
.athath-overlay.athath-open {
  opacity   : 1;
  visibility: visible;
}

/* ── Modal ── */
.athath-modal {
  display          : flex;
  width            : 100%;
  max-width        : 860px;
  min-height       : 520px;
  border-radius    : 14px;
  overflow         : hidden;
  box-shadow       : var(--athath-shadow);
  transform        : translateY(28px) scale(.97);
  transition       : transform .3s cubic-bezier(.34,1.56,.64,1);
  background       : var(--athath-white);
}
.athath-overlay.athath-open .athath-modal {
  transform: translateY(0) scale(1);
}

/* ── Panel gauche (teal) ── */
.athath-panel--left {
  width           : 38%;
  background      : linear-gradient(160deg, var(--athath-teal) 0%, var(--athath-teal-dark) 100%);
  padding         : 40px 32px;
  display         : flex;
  align-items     : center;
  justify-content : center;
  flex-shrink     : 0;
  position        : relative;
  overflow        : hidden;
}
.athath-panel--left::before {
  content   : '';
  position  : absolute;
  width     : 220px;
  height    : 220px;
  border-radius: 50%;
  border    : 1px solid rgba(255,255,255,.08);
  top       : -60px;
  right     : -60px;
}
.athath-panel--left::after {
  content   : '';
  position  : absolute;
  width     : 160px;
  height    : 160px;
  border-radius: 50%;
  border    : 1px solid rgba(255,255,255,.06);
  bottom    : -40px;
  left      : -40px;
}

.athath-left-content {
  text-align : center;
  color      : var(--athath-white);
  position   : relative;
  z-index    : 1;
}
.athath-logo {
  /* width        : 72px;
  height       : 72px; */
  object-fit   : contain;
  border-radius: 12px;
  background   : rgba(255,255,255,.12);
  padding      : 8px;
  margin-bottom: 20px;
}
.athath-left-content h2 {
  font-family   : 'Poppins', sans-serif;
  font-size     : 1.25rem;
  font-weight   : 600;
  margin        : 0 0 10px;
  color         : var(--athath-white);
  line-height   : 1.3;
}
.athath-left-content p {
  font-size  : .85rem;
  opacity    : .85;
  line-height: 1.5;
  margin     : 0 0 24px;
}
.athath-features {
  list-style : none;
  padding    : 0;
  margin     : 0;
  text-align : left;
}
.athath-features li {
  display    : flex;
  align-items: center;
  gap        : 10px;
  font-size  : .82rem;
  opacity    : .9;
  padding    : 6px 0;
}
.athath-features li svg {
  width    : 16px;
  height   : 16px;
  flex-shrink: 0;
}

/* ── Panel droit (blanc) ── */
.athath-panel--right {
  flex      : 1;
  padding   : 40px 36px;
  position  : relative;
  overflow-y: auto;
  background: var(--athath-white);
}

/* ── Bouton fermer ── */
.athath-close {
  position  : absolute;
  top       : 16px;
  right     : 16px;
  background: none;
  border    : none;
  font-size : 1.5rem;
  color     : var(--athath-gray-600);
  cursor    : pointer;
  line-height: 1;
  padding   : 4px 8px;
  border-radius: var(--athath-radius);
  transition: background var(--athath-transition), color var(--athath-transition);
}
.athath-close:hover {
  background: var(--athath-gray-100);
  color     : var(--athath-gray-800);
}

/* ── Form wrap ── */
.athath-form-wrap h3 {
  font-family: 'Poppins', sans-serif;
  font-size  : 1.45rem;
  font-weight: 700;
  color      : var(--athath-gray-800);
  margin     : 0 0 6px;
}
.athath-subtitle {
  font-size : .82rem;
  color     : var(--athath-gray-600);
  margin    : 0 0 22px;
}

/* ── Champs ── */
.athath-field {
  margin-bottom: 16px;
}
.athath-field label {
  display    : block;
  font-size  : .80rem;
  font-weight: 500;
  color      : var(--athath-gray-800);
  margin-bottom: 6px;
}
.athath-field input[type="text"],
.athath-field input[type="email"],
.athath-field input[type="password"] {
  width          : 100%;
  padding        : 10px 14px;
  border         : 1.5px solid var(--athath-gray-200);
  border-radius  : var(--athath-radius);
  font-size      : .875rem;
  font-family    : 'Poppins', sans-serif;
  color          : var(--athath-gray-800);
  background     : var(--athath-gray-100);
  transition     : border-color var(--athath-transition),
                   box-shadow var(--athath-transition);
  box-sizing     : border-box;
  outline        : none;
}
.athath-field input:focus {
  border-color: var(--athath-teal);
  background  : var(--athath-white);
  box-shadow  : 0 0 0 3px rgba(26,128,128,.12);
}
.athath-field input.athath-input-error {
  border-color: var(--athath-error);
}

.athath-input-wrap {
  position: relative;
}
.athath-input-wrap input {
  padding-right: 42px;
}
.athath-eye {
  position   : absolute;
  right      : 12px;
  top        : 50%;
  transform  : translateY(-50%);
  background : none;
  border     : none;
  cursor     : pointer;
  padding    : 0;
  color      : var(--athath-gray-400);
  display    : flex;
  align-items: center;
}
.athath-eye svg {
  width : 18px;
  height: 18px;
}
.athath-eye:hover { color: var(--athath-teal); }

/* ── Remember / forgot row ── */
.athath-row-check {
  display        : flex;
  align-items    : center;
  justify-content: space-between;
  margin-bottom  : 20px;
  font-size      : .80rem;
}
.athath-check-label {
  display    : flex;
  align-items: center;
  gap        : 8px;
  cursor     : pointer;
  font-size  : .80rem;
  color      : var(--athath-gray-800);
}
.athath-check-label input[type="checkbox"] {
  width       : 15px;
  height      : 15px;
  accent-color: var(--athath-teal);
  cursor      : pointer;
}
.athath-field--check {
  margin-bottom: 18px;
}
.athath-field--check .athath-check-label {
  align-items: flex-start;
}
.athath-field--check .athath-check-label input {
  margin-top: 2px;
}

/* ── Link ── */
.athath-link {
  color          : var(--athath-teal);
  text-decoration: none;
  font-size      : .80rem;
}
.athath-link:hover { text-decoration: underline; }

/* ── Primary Button ── */
.athath-btn--primary {
  display        : flex;
  align-items    : center;
  justify-content: center;
  gap            : 8px;
  width          : 100%;
  padding        : 13px;
  background     : var(--athath-teal);
  color          : var(--athath-white);
  border         : none;
  border-radius  : var(--athath-radius);
  font-family    : 'Poppins', sans-serif;
  font-size      : .82rem;
  font-weight    : 600;
  letter-spacing : .06em;
  cursor         : pointer;
  transition     : background var(--athath-transition),
                   transform  var(--athath-transition),
                   box-shadow var(--athath-transition);
  margin-bottom  : 16px;
}
.athath-btn--primary:hover {
  background : var(--athath-teal-dark);
  box-shadow : 0 4px 16px rgba(26,128,128,.3);
  transform  : translateY(-1px);
}
.athath-btn--primary:active { transform: translateY(0); }
.athath-btn--primary:disabled {
  opacity: .7;
  cursor : not-allowed;
  transform: none;
}

/* ── Spinner ── */
.athath-spinner {
  display      : inline-block;
  width        : 16px;
  height       : 16px;
  border       : 2px solid rgba(255,255,255,.4);
  border-top-color: var(--athath-white);
  border-radius: 50%;
  animation    : athath-spin .7s linear infinite;
}
@keyframes athath-spin { to { transform: rotate(360deg); } }

/* ── Switch text ── */
.athath-switch-text {
  text-align : center;
  font-size  : .80rem;
  color      : var(--athath-gray-600);
  margin     : 0 0 16px;
}

/* ── Divider ── */
.athath-divider {
  display        : flex;
  align-items    : center;
  gap            : 12px;
  margin-bottom  : 16px;
  font-size      : .78rem;
  color          : var(--athath-gray-400);
}
.athath-divider::before,
.athath-divider::after {
  content   : '';
  flex      : 1;
  height    : 1px;
  background: var(--athath-gray-200);
}

/* ── Social buttons ── */
.athath-social {
  display        : flex;
  justify-content: center;
  gap            : 14px;
}
.athath-social-btn {
  display        : flex;
  align-items    : center;
  justify-content: center;
  width          : 46px;
  height         : 46px;
  border         : 1.5px solid var(--athath-gray-200);
  border-radius  : var(--athath-radius);
  background     : var(--athath-white);
  transition     : border-color var(--athath-transition),
                   box-shadow var(--athath-transition);
  text-decoration: none;
}
.athath-social-btn:hover {
  border-color: var(--athath-teal);
  box-shadow  : 0 2px 8px rgba(26,128,128,.15);
}
.athath-social-btn svg {
  width : 22px;
  height: 22px;
}

/* ── Messages (erreur / succès) ── */
.athath-msg {
  padding      : 10px 14px;
  border-radius: var(--athath-radius);
  font-size    : .82rem;
  margin-bottom: 14px;
}
.athath-msg--error {
  background: #fdf0ef;
  color     : var(--athath-error);
  border    : 1px solid #f5c6c2;
}
.athath-msg--success {
  background: #edfbf3;
  color     : var(--athath-success);
  border    : 1px solid #b8f0d0;
}

/* ── Utility ── */
.athath-hidden { display: none !important; }

/* =========================================================
   RESPONSIVE – Mobile (≤ 600px)
   ========================================================= */
@media (max-width: 600px) {
  .athath-overlay { padding: 0; align-items: flex-end; }

  .athath-modal {
    flex-direction: column;
    border-radius : 16px 16px 0 0;
    min-height    : auto;
    max-width     : 100%;
    max-height    : 92dvh;
    transform     : translateY(100%);
  }
  .athath-overlay.athath-open .athath-modal {
    transform: translateY(0);
  }

  .athath-panel--left { display: none; }

  .athath-panel--right {
    padding   : 28px 20px 24px;
    max-height: 92dvh;
  }

  .athath-close { top: 14px; right: 14px; }

  /* Handle bar */
  .athath-panel--right::before {
    content      : '';
    display      : block;
    width        : 40px;
    height       : 4px;
    border-radius: 2px;
    background   : var(--athath-gray-200);
    margin       : 0 auto 20px;
  }
}

/* =========================================================
   RESPONSIVE – Tablette (601–900px)
   ========================================================= */
@media (min-width: 601px) and (max-width: 900px) {
  .athath-modal  { max-width: 680px; }
  .athath-panel--left { width: 36%; padding: 28px 20px; }
  .athath-panel--right { padding: 28px 24px; }
  .athath-logo { width: 56px; height: 56px; }
}