/* --- VARIABLES GLOBALES AFRICA SURG --- */
:root {
    --primary-red: #e60023;
    --hover-red: #ad081b;
    --dark-text: #111111;
    --gray-text: #5f5f5f;
    --light-gray: #f0f0f0;
    --border-gray: #adacac;
    --modal-bg: #ffffff;
    --overlay-bg: rgba(0, 0, 0, 0.8);
}

/* --- STRUCTURE PRINCIPALE DU MODAL --- */
.pinterest-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    align-items: center;
    justify-content: center;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    padding: 20px;
}

.pinterest-modal.active { 
    display: flex; 
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: var(--overlay-bg);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px); /* Safari support */
}

.modal-container {
    position: relative;
    background: var(--modal-bg);
    width: 100%;
    max-width: 400px;
    padding: 40px;
    border-radius: 32px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    z-index: 10001;
    animation: fadeInModal 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

@keyframes fadeInModal {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- ÉLÉMENTS DE CONTRÔLE --- */
.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--light-gray);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dark-text);
    transition: background 0.2s, transform 0.1s;
}

.close-btn:hover {
    background: #e2e2e2;
    transform: scale(1.05);
}

/* --- TYPOGRAPHIE --- */
.modal-content { text-align: center; }
.modal-title { font-size: 26px; font-weight: 700; margin-bottom: 8px; color: var(--dark-text); letter-spacing: -0.5px; }
.modal-subtitle { font-size: 15px; color: var(--gray-text); margin-bottom: 25px; }

/* --- CHAMPS DE SAISIE (INPUTS) --- */
.input-group { margin-bottom: 14px; position: relative; width: 100%; }

.input-group input {
    width: 100%;
    height: 52px;
    padding: 0 16px 0 48px; /* Espace à gauche pour l'icône */
    border: 2px solid var(--border-gray);
    border-radius: 16px;
    font-size: 16px;
    font-weight: 500;
    outline: none;
    box-sizing: border-box;
    transition: all 0.2s ease;
    color: var(--dark-text);
}



.input-group input::placeholder {
    color: #4b4b4b !important;
    opacity: 1;
    font-weight: 500;
}

.input-group input:focus {
    border-color: var(--primary-red);
    box-shadow: 0 0 0 4px rgba(230, 0, 35, 0.1);
}

/* --- BOUTONS ET ACTIONS --- */
.forgot-box { text-align: right; margin: -5px 0 20px 0; }
.forgot-link { font-size: 14px; font-weight: 700; color: var(--dark-text); text-decoration: none; }
.forgot-link:hover { text-decoration: underline; }

.btn-submit {
    width: 100%;
    height: 52px;
    background: var(--primary-red);
    color: #fff;
    border: none;
    border-radius: 26px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
    display: block;
}

.btn-submit:hover { 
    background: var(--hover-red); 
    transform: translateY(-1px); 
}

.btn-submit:active { 
    transform: translateY(0); 
}

/* --- SÉPARATEUR ET FOOTER --- */
.separator { margin: 25px 0; border-bottom: 1px solid #e2e2e2; line-height: 0.1em; text-align: center; }
.separator span { background: #fff; padding: 0 15px; color: #767676; font-size: 14px; font-weight: 500; }

.footer-link { font-size: 15px; color: var(--dark-text); }
.footer-link a { font-weight: 700; color: var(--dark-text); text-decoration: none; }
.footer-link a:hover { text-decoration: underline; }

.terms-text { font-size: 12px; color: var(--gray-text); margin-bottom: 20px; line-height: 1.4; }


.loader-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid #ffffff;
    border-bottom-color: transparent;
    border-radius: 50%;
    display: inline-block;
    animation: rotation 1s linear infinite;
    vertical-align: middle;
    margin-left: 10px;
}

@keyframes rotation {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}



/* pour le moda en cas d'ereur d'identifuant */

/* Style universel pour toutes les erreurs du modal (PHP et AJAX) */
.error-blocked, 
.error-message, 
#ajax-error-container {
    background-color: #fff5f5 !important;
    color: #e74c3c !important; /* Rouge pro */
    padding: 12px 15px !important;
    border-radius: 8px !important;
    border: 1px solid #fadbd8 !important;
    margin-bottom: 20px !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    text-align: center !important;
    display: block;
    box-shadow: 0 2px 5px rgba(231, 76, 60, 0.1);
}

/* Cacher le container AJAX s'il est vide */
#ajax-error-container:empty {
    display: none;
}

/* Animation de secousse */
@keyframes shakeError {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-7px); }
    40%, 80% { transform: translateX(7px); }
}

.shake-it {
    animation: shakeError 0.4s ease-in-out;
}

/* Désactivation du bouton pendant le chargement */
.btn-submit:disabled {
    background-color: #d5dbdb !important;
    cursor: not-allowed;
    color: #7f8c8d !important;
}