/* ============================================================
   HACCP Newsletter — Popup styles
   Design adapté à methodehaccp.com
   ============================================================ */

/* --- Overlay --- */
#haccp-nl-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(3px);
    z-index: 99998;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: haccp-fade-in 0.3s ease;
}

#haccp-nl-overlay[hidden] {
    display: none !important;
}

@keyframes haccp-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* --- Boîte popup --- */
#haccp-nl-popup {
    background: #fff;
    border-radius: 10px;
    padding: 40px 44px;
    max-width: 500px;
    width: 100%;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    animation: haccp-slide-up 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-family: Georgia, 'Times New Roman', serif;
}

@keyframes haccp-slide-up {
    from { opacity: 0; transform: translateY(30px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* --- Bouton fermer --- */
#haccp-nl-close {
    position: absolute;
    top: 14px;
    right: 14px;
    background: none;
    border: none;
    font-size: 18px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 4px 8px;
    border-radius: 4px;
    transition: color 0.2s, background 0.2s;
}
#haccp-nl-close:hover {
    color: #1a1a1a;
    background: #f3f3f3;
}

/* --- Icône --- */
.haccp-nl-icon {
    font-size: 40px;
    margin-bottom: 16px;
    line-height: 1;
}

/* --- Titre --- */
#haccp-nl-title {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 12px;
    line-height: 1.3;
    font-family: Georgia, 'Times New Roman', serif;
}

/* --- Sous-titre --- */
.haccp-nl-subtitle {
    font-size: 15px;
    color: #555;
    line-height: 1.6;
    margin: 0 0 24px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* --- Champ email --- */
.haccp-nl-field {
    margin-bottom: 14px;
}
.haccp-nl-field input[type="email"] {
    width: 100%;
    padding: 13px 16px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #1a1a1a;
}
.haccp-nl-field input[type="email"]:focus {
    border-color: #1a1a1a;
}
.haccp-nl-field input[type="email"].error {
    border-color: #c0392b;
}

/* --- RGPD --- */
.haccp-nl-gdpr {
    margin-bottom: 20px;
}
.haccp-nl-gdpr label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.haccp-nl-gdpr input[type="checkbox"] {
    margin-top: 3px;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    accent-color: #1a1a1a;
    cursor: pointer;
}
.haccp-nl-gdpr span {
    font-size: 12px;
    color: #777;
    line-height: 1.5;
}
.haccp-nl-gdpr a {
    color: #1a1a1a;
    text-decoration: underline;
}

/* --- Bouton s'abonner --- */
#haccp-nl-submit {
    width: 100%;
    padding: 14px 20px;
    background: #1a1a1a;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    letter-spacing: 0.3px;
}
#haccp-nl-submit:hover {
    background: #333;
}
#haccp-nl-submit:active {
    transform: scale(0.99);
}
#haccp-nl-submit:disabled {
    background: #888;
    cursor: not-allowed;
}

/* --- Anti-spam mention --- */
.haccp-nl-antispam {
    text-align: center;
    font-size: 12px;
    color: #999;
    margin: 12px 0 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* --- Honeypot (invisible) --- */
.haccp-nl-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* --- États de retour --- */
#haccp-nl-success,
#haccp-nl-already {
    text-align: center;
    padding: 16px 0 8px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.haccp-nl-success-icon {
    font-size: 48px;
    margin-bottom: 16px;
}
#haccp-nl-success h3,
#haccp-nl-already h3 {
    font-size: 20px;
    color: #1a1a1a;
    margin: 0 0 12px;
    font-family: Georgia, serif;
}
#haccp-nl-success p,
#haccp-nl-already p {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
    margin: 0 0 8px;
}
.haccp-nl-hint {
    font-size: 12px !important;
    color: #999 !important;
}

/* --- Erreur --- */
.haccp-nl-error-msg {
    color: #c0392b;
    font-size: 14px;
    text-align: center;
    padding: 10px;
    background: #fdf3f2;
    border-radius: 6px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* --- Responsive --- */
@media (max-width: 540px) {
    #haccp-nl-popup {
        padding: 32px 24px;
    }
    #haccp-nl-title {
        font-size: 20px;
    }
}
