/* =============================================================
   BAZI CALCULATOR — Styles
   ============================================================= */

.bazi-wrapper {
    max-width: 760px;
    margin: 0 auto;
    font-family: inherit;
    padding: 8px 0;
}

/* Anti-bot honeypot : caché pour les humains, pas en display:none pour éviter certains bots */
.bazi-hp {
  position: absolute !important;
  left: -10000px !important;
  top: auto !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

/* ------------------------------------------------------------------
   FORMULAIRE
   ------------------------------------------------------------------ */

.bazi-form {
    background: #fff;
    border-radius: 16px;
    padding: 36px 40px;
    box-shadow: 0 2px 24px rgba(0,0,0,0.07);
    border: 1px solid #f0eaf8;
}

.bazi-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.bazi-form-group {
    margin-bottom: 20px;
}

.bazi-form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.88rem;
    margin-bottom: 7px;
    color: #3a2460;
    letter-spacing: 0.02em;
}

.bazi-form-group input[type="text"],
.bazi-form-group input[type="email"],
.bazi-form-group input[type="date"],
.bazi-form-group input[type="time"],
.bazi-form-group select {
    width: 100%;
    padding: 11px 15px;
    border: 1.5px solid #ddd5f0;
    border-radius: 9px;
    font-size: 0.97rem;
    background: #faf8fe;
    color: #2c1a4a;
    transition: border-color 0.25s, box-shadow 0.25s;
    box-sizing: border-box;
}

.bazi-form-group input:focus,
.bazi-form-group select:focus {
    outline: none;
    border-color: #8B5CF6;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(139,92,246,0.12);
}

/* Checkbox RGPD */
.bazi-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 0.84rem;
    color: #5a5070;
    line-height: 1.5;
}

.bazi-checkbox-label input[type="checkbox"] {
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: #8B5CF6;
    width: 16px;
    height: 16px;
}

.bazi-checkbox-label a {
    color: #8B5CF6;
    text-decoration: underline;
}

/* Message d'erreur */
.bazi-erreur {
    background: #fde8e8;
    border: 1px solid #f0a0a0;
    border-radius: 8px;
    padding: 11px 16px;
    font-size: 0.88rem;
    color: #8b1a1a;
    margin-bottom: 16px;
}

/* Bouton submit */
.bazi-btn-submit {
    width: 100%;
    padding: 15px 24px;
    background: linear-gradient(135deg, #8B5CF6 0%, #6D28D9 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 0.01em;
    transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
    box-shadow: 0 4px 18px rgba(109,40,217,0.3);
    margin-top: 4px;
}

.bazi-btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(109,40,217,0.4);
}

.bazi-btn-submit:active {
    transform: translateY(0);
}

/* ------------------------------------------------------------------
   LOADER
   ------------------------------------------------------------------ */

#bazi-loading {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 64px 20px;
    text-align: center;
}

.bazi-loader-spinner {
    width: 52px;
    height: 52px;
    border: 4px solid #ede9fe;
    border-top-color: #8B5CF6;
    border-radius: 50%;
    animation: bazi-spin 0.9s linear infinite;
    margin-bottom: 22px;
}

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

.bazi-loader-text {
    font-size: 1.05rem;
    font-weight: 600;
    color: #4c1d95;
    margin-bottom: 6px;
}

.bazi-loader-subtext {
    font-size: 0.84rem;
    color: #9b7aaa;
    max-width: 340px;
}

/* ------------------------------------------------------------------
   RÉSULTAT
   ------------------------------------------------------------------ */

#bazi-resultat {
    display: none;
}

.bazi-result-wrapper {
    animation: bazi-fadeIn 0.5s ease both;
}

@keyframes bazi-fadeIn {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Header résultat */
.bazi-header {
    text-align: center;
    padding: 32px 28px 26px;
    border-radius: 16px;
    border: 2px solid;
    margin-bottom: 28px;
}

.bazi-header-icon {
    font-size: 2.6rem;
    margin-bottom: 10px;
    display: block;
}

.bazi-header h2 {
    font-size: 1.7rem;
    color: #2c1a4a;
    margin: 0 0 8px;
    font-weight: 700;
}

.bazi-prenom-hl {
    color: #8B5CF6;
}

.bazi-element-maitre {
    font-size: 1.05rem;
    margin: 0 0 4px;
}

.bazi-annee-bazi {
    font-size: 0.82rem;
    color: #9b8aaa;
    margin: 0;
}

/* Les 4 piliers */
.bazi-piliers {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 32px;
}

.bazi-pilier {
    background: #fff;
    border: 1px solid #ede8f8;
    border-radius: 13px;
    padding: 18px 14px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(109,40,217,0.05);
}

.bazi-pilier-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #9b7aaa;
    margin-bottom: 12px;
}

.bazi-pilier-tige {
    border-radius: 8px;
    border: 1px solid;
    padding: 9px 8px;
    margin-bottom: 6px;
}

.bazi-pilier-sep {
    font-size: 0.7rem;
    color: #ccc;
    margin: 2px 0;
}

.bazi-pilier-branche {
    background: #f8f6ff;
    border-radius: 8px;
    padding: 9px 8px;
    border: 1px solid #ede8f8;
}

.bazi-nom {
    display: block;
    font-size: 1.05rem;
    font-weight: 700;
    color: #2c1a4a;
    margin-bottom: 3px;
}

.bazi-detail {
    display: block;
    font-size: 0.72rem;
    color: #7a6090;
    line-height: 1.3;
}

/* Analyse */
.bazi-analyse {
    background: #fff;
    border-radius: 16px;
    padding: 32px 36px;
    border: 1px solid #ede8f8;
    margin-bottom: 20px;
    box-shadow: 0 2px 16px rgba(109,40,217,0.05);
}

.bazi-analyse h3 {
    font-size: 1.25rem;
    color: #4c1d95;
    margin: 0 0 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid #f0e8ff;
}

.bazi-analyse-contenu {
    font-size: 0.95rem;
    line-height: 1.75;
    color: #3a2460;
}

.bazi-analyse-contenu h4 {
    font-size: 1.02rem;
    font-weight: 700;
    color: #6D28D9;
    margin: 20px 0 8px;
}

.bazi-analyse-contenu p {
    margin: 0 0 14px;
}

.bazi-analyse-contenu strong {
    color: #4c1d95;
}

/* Notice email */
.bazi-email-notice {
    text-align: center;
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 10px;
    padding: 13px 20px;
    font-size: 0.88rem;
    color: #166534;
    margin-bottom: 20px;
}

/* Bouton reset */
.bazi-btn-reset {
    background: none;
    border: 1.5px solid #c4b5f8;
    color: #6D28D9;
    padding: 10px 22px;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    display: block;
    margin: 0 auto;
}

.bazi-btn-reset:hover {
    background: #ede9fe;
    color: #4c1d95;
}

/* ------------------------------------------------------------------
   RESPONSIVE
   ------------------------------------------------------------------ */

@media (max-width: 680px) {
    .bazi-form {
        padding: 24px 20px;
    }
    .bazi-form-row {
        grid-template-columns: 1fr;
    }
    .bazi-piliers {
        grid-template-columns: repeat(2, 1fr);
    }
    .bazi-analyse {
        padding: 24px 20px;
    }
}

@media (max-width: 420px) {
    .bazi-piliers {
        grid-template-columns: 1fr 1fr;
    }
    .bazi-header h2 {
        font-size: 1.3rem;
    }
}
