/* ══════════════════════════════════════════════════════
   StockAlert Combo - CSS
   Bouton "Me prévenir" + Popup psae-*
   ══════════════════════════════════════════════════════ */

/* ── Bouton hors stock ── */
.btn-stockalert-combo {
    display: inline-block;
    padding: 4px 8px;
    border: 1px solid #f9a51a;
    background: transparent;
    color: #f9a51a;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
    line-height: 1.4;
}

.btn-stockalert-combo:hover {
    background: #f9a51a;
    color: #1a1a1a;
}

/* ── Popup overlay ── */
.psae-pop {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Caché par défaut via aria-hidden */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

.psae-pop.is-open {
    opacity: 1;
    pointer-events: auto;
}

/* Fond sombre */
.psae-pop__bg {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    cursor: pointer;
}

/* Panneau central */
.psae-pop__panel {
    position: relative;
    background: #1e1e1e;
    border: 1px solid #333;
    color: #fff;
    padding: 30px 28px 24px;
    max-width: 400px;
    width: 90%;
    border-radius: 3px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.6);
    z-index: 1;
}

/* Croix fermeture */
.psae-pop__close {
    position: absolute;
    top: 10px;
    right: 14px;
    background: none;
    border: none;
    color: #aaa;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

.psae-pop__close:hover {
    color: #fff;
}

/* Titre */
.psae-pop__title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #fff;
    margin-bottom: 18px;
    padding-right: 24px; /* évite chevauchement avec la croix */
}

/* Note client connecté */
.psae-pop__note {
    font-size: 13px;
    color: #ccc;
    line-height: 1.5;
    margin-bottom: 14px;
}

/* Champ email */
#psae-email {
    display: block;
    width: 100%;
    padding: 10px 12px;
    background: #fff;
    color: #333;
    border: none;
    font-size: 14px;
    margin-bottom: 12px;
    box-sizing: border-box;
    outline: none;
}

#psae-email:focus {
    box-shadow: 0 0 0 2px #29b5aa;
}

/* Bouton Valider */
#psae-submit {
    display: block;
    width: 100%;
    padding: 12px;
    background: #29b5aa;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    letter-spacing: 0.05em;
    transition: background 0.2s;
}

#psae-submit:hover {
    background: #229e94;
}

#psae-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Message retour */
.psae-pop__msg {
    margin-top: 10px;
    font-size: 13px;
    min-height: 18px;
    text-align: center;
}

.psae-success { color: #4caf50; }
.psae-error   { color: #f44336; }

/* ── Popup mobile ── */
@media (max-width: 600px) {
  .psae-pop__panel {
    width: 82%;
    padding: 20px 16px 16px;
  }

  .psae-pop__title {
    font-size: 11px;
    margin-bottom: 12px;
  }

  #psae-email {
    padding: 8px 10px;
    font-size: 13px;
  }

  #psae-submit {
    padding: 10px;
    font-size: 13px;
  }

  .psae-pop__note,
  .psae-pop__msg {
    font-size: 12px;
  }
}

/* ── Page Mes alertes : override fond blanc PS ── */
.page-my-account #content.page-content,
#module-stockalert_combo-alerts #content.page-content,
#module-stockalert_combo-alerts section#content.page-content.card.card-block {
  background-color: transparent !important;
  border-color: #00b3b3 !important;
}
