/*
Theme Name: 	MFM Digital
Theme URI: 		http://themes.muffingroup.com/betheme
Author: 		MFM Digital
Author URI: 	http://mfmdigital.com.com
Description:	MFM Digital Child Theme
Template:		betheme
Version: 		1.0.0
*/

/* Theme customization starts here
-------------------------------------------------------------- */

/* ===== VARIABLES CSS GLOBALES ===== */
:root {
    /* Sidebar Variables */
    --sidebar-width: 240px;
    --sidebar-collapsed-width: 60px;
    --sidebar-text: #ffffff;
    --sidebar-accent: #007cba;
    --sidebar-hover: #2c2c2c;
    --sidebar-border: #333333;
    --sidebar-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);

    /* Couleurs principales */
    --primary-color: #2563eb;
    --primary-hover: #2260FF;
    --primary-black: #0D0D1B;
    --primary-green : #22BB00;
    --primary-red : #FF0000;
    --primary-light: #eff6ff;
    --primary-shadow: rgba(59, 130, 246, 0.3);
    --primary-focus: rgba(59, 130, 246, 0.1);

    /* Couleurs secondaires */
    --secondary-color: #6b7280;
    --secondary-hover: #4b5563;

    /* Couleurs de succès */
    --success-color: #10b981;
    --success-hover: #059669;
    --success-light: #f0fdf4;
    --success-border: #22c55e;

    /* Couleurs d'erreur/danger */
    --danger-color: #ef4444;
    --danger-hover: #dc2626;
    --danger-light: #fecaca;

    /* Couleurs d'avertissement */
    --warning-color: #f59e0b;
    --warning-light: #fef3c7;
    --warning-border: #f59e0b;

    /* Couleurs neutres */
    --white: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-800: #1f2937;

    /* Couleurs de fond */
    --bg-primary: var(--white);
    --bg-secondary: var(--gray-50);
    --bg-tertiary: var(--gray-100);
    --bg-overlay: rgba(0, 0, 0, 0.5);

    /* Couleurs de texte */
    --text-primary: var(--gray-800);
    --text-muted: var(--gray-500);
    --text-light: var(--gray-400);

    /* Couleurs de bordure */
    --border-light: var(--gray-200);
    --border-medium: var(--gray-300);

    /* Ombres */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

a:hover{
    color: var(--white);
}

/* Boutons communs */
.btn-primary {
    background: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--primary-shadow);
}

/* ===== SYSTÈME DE MODALES ===== */

/* ===== MODAL EMAILS AUTORISÉS ===== */
.emails-container {
    .emails-list {
        margin-bottom: 16px;
        max-height: 300px;
        overflow-y: auto;
        border: 1px solid var(--border-light);
        border-radius: 6px;
        padding: 8px;

        .no-emails {
            text-align: center;
            color: var(--text-muted);
            font-style: italic;
            margin: 16px 0;
        }

        .email-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 8px;
            background: var(--bg-secondary);
            border-radius: 4px;
            margin-bottom: 4px;

            &:last-child {
                margin-bottom: 0;
            }

            .email-text {
                font-family: monospace;
                color: var(--text-primary);
            }

            .remove-email-btn {
                background: red;
                color: white;
                border: none;
                width: 20px;
                height: 20px;
                border-radius: 50%;
                cursor: pointer;
                display: flex;
                align-items: center;
                justify-content: center;
                font-size: 10px;
                padding: 0;
                line-height: 1;
                transition: all 0.3s ease;

                &:hover {
                    background: darkred;
                    transform: scale(1.1);
                }
            }
        }
    }

    .add-email-section {
        .email-input-group {
            display: flex;
            gap: 8px;
            align-items: flex-end;

            .email-input {
                flex: 1;
                margin-bottom: 0;
                padding: 8px;
                border: 1px solid var(--border-medium);
                border-radius: 4px;
                font-size: 0.875rem;

                &:focus {
                    outline: none;
                    border-color: var(--primary-color);
                    box-shadow: 0 0 0 2px rgba(var(--primary-color-rgb), 0.1);
                }
            }

            .add-email-btn {
                padding: 8px 12px;
                white-space: nowrap;
            }
        }
    }
}

/* Modal de base */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-overlay);
    backdrop-filter: blur(5px);
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal.show {
    display: block;
    visibility: visible;
    opacity: 1;
}

/* Contenu de la modal */
.modal-content {
    background-color: var(--bg-primary);
    margin: 5% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    box-shadow: var(--shadow-xl);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* En-tête de la modal */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid var(--border-light);
}

.modal-header h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
}

/* ===== FORMULAIRES COMMUNS ===== */

.form-group {
    margin-bottom: 16px;

    label {
        display: block;
        margin-bottom: 8px;
        font-weight: 600;
        color: var(--text-primary);
        font-size: 0.875rem;
    }

    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="tel"],
    select,
    textarea {
        width: 100%;
        padding: 12px;
        border: 1px solid #2260FF;
        border-radius: 6px;
        font-size: 1rem;
        background: var(--bg-primary);
        color: var(--text-primary);
        transition: all 0.3s;

        &:focus {
            outline: none;
            border-color: var(--primary-color);
            box-shadow: 0 0 0 2px rgba(var(--primary-color-rgb), 0.2);
        }

        &::placeholder {
            color: var(--text-muted);
        }
    }

    select {
        cursor: pointer;
        appearance: none;
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
        background-position: right 8px center;
        background-repeat: no-repeat;
        background-size: 16px 12px;
        padding-right: 20px;
    }
}

/* Bouton de fermeture */
.close {
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.3s ease;
}

.close:hover {
    color: var(--text-primary);
}

/* Corps de la modal */
.modal-body {
    padding: 30px;
}

/* Pied de la modal */
.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    padding: 20px 30px;
    border-top: 1px solid var(--border-light);
    background-color: var(--bg-secondary);
    border-radius: 0 0 12px 12px;
}

/* ===== INTERFACE D'UPLOAD D'IMAGES ===== */

/* Container d'upload */
.image-upload-container {
    text-align: center;
    padding: 20px;
}

/* Aperçu d'image */
.image-preview {
    margin-bottom: 20px;
}

.image-preview img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
}

/* Boutons d'upload */
.upload-btn {
    background: var(--success-color);
    color: var(--white);
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    margin-right: 12px;
    transition: background 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.upload-btn:hover {
    background: var(--success-hover);
}

.remove-btn {
    background: var(--danger-color);
    color: var(--white);
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: background 0.3s ease;
}

.remove-btn:hover {
    background: var(--danger-hover);
}



/* ===== OVERLAY DE CHARGEMENT ===== */

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-overlay);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    backdrop-filter: blur(2px);
}

.loading-spinner {
    background: var(--bg-primary);
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.loading-spinner i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 16px;
}

.loading-spinner span {
    color: var(--text-primary);
    font-size: 1rem;
}

/* ===== MESSAGE DE SUCCÈS ===== */

.success-message {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--success-color);
    color: var(--white);
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideInRight 0.3s ease;
    &.error {
        background: var(--danger-color);
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.success-message i {
    font-size: 1.2rem;
}

/* ===== BOUTONS COMMUNS ===== */

.btn {
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-secondary {
    background: var(--secondary-color);
    color: var(--white);
}

.btn-secondary:hover {
    background: var(--secondary-hover);
}

.btn-danger {
    background: var(--danger-color);
    color: var(--white);
}

.btn-danger:hover {
    background: var(--danger-hover);
}

/* ===== RESPONSIVE COMMUN ===== */

@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 12px;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 16px;
    }
    

    
    .success-message {
        top: 12px;
        right: 12px;
        left: 12px;
    }
}

/* ===== MODAL TEMPLATE PERSONNALISÉ ===== */

/* Ajustements spécifiques pour le modal de template personnalisé */
#customTemplateModal .modal-content {
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    margin: 5vh auto;
}

#customTemplateModal .modal-body {
    max-height: calc(90vh - 140px);
    overflow-y: auto;
    padding: 20px 30px;
}

#customTemplateModal .forminator-form-wrapper {
    margin-bottom: 20px;
}

/* ===== TOOLTIPS TIPPY.JS GLOBAUX ===== */

/* Styles personnalisés pour les tooltips Tippy.js */
.tippy-box[data-theme~='custom'] {
    background-color: #2260ff;
    color: white;
}

.tippy-box[data-theme~='custom'] .tippy-arrow {
    color: #2260ff;
}

.coins .section_wrapper img{
    height: 250px!important;
    width : 250px!important;
    object-fit: contain!important;
}
.coins .section_wrapper .image_wrapper{
    display: flex!important;
    justify-content: center!important;
    align-items: center!important;
}

/* ===== FORMULAIRE D'INSCRIPTION ===== */

.signin_container {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
    background: var(--bg-primary);
}

.signin_form_wrapper {
    width: 100%;
}

.signin_title {
    text-align: center;
    color: var(--text-primary);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 32px;
    position: relative;
}

.signin_title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
}

.signin_form {
    display: flex;
    flex-direction: column;
}

.signin_form .form_row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.signin_form .form_group {
    display: flex;
    flex-direction: column;
    margin-bottom: 0;
}

.signin_form .form_group label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.signin_form .form_group .field-note {
    display: block;
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 4px;
    font-style: italic;
}

.signin_form .form_group input {
    padding: 14px 16px;
    border: 1px solid #2260FF;
    border-radius: 8px;
    font-size: 1rem;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: all 0.3s ease;
    width: 100%;
}

.signin_form .form_group input:focus {
    outline: none;
    border-color: #2260ff;
    box-shadow: 0 0 0 3px rgba(34, 96, 255, 0.1);
    transform: translateY(-1px);
}

.signin_form .form_group input::placeholder {
    color: var(--text-muted);
    font-style: italic;
}

/* Champs non remplis - couleur grise */
.signin_form .form_group input:not(:focus):not(.touched) {
    border-color: #2260FF;
}

/* Champs valides après interaction - garder la bordure grise */
.signin_form .form_group input.touched:valid {
    border-color: #2260FF;
}

/* Champs invalides après interaction */
.signin_form .form_group input.touched:invalid {
    border-color: var(--danger-color);
}

/* Champ adresse avec autocomplete Google */
.signin_form .form_group input#street {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px 12px;
    padding-right: 40px;
}

/* Champs de mot de passe */
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.password-input-wrapper input {
    padding-right: 50px;
}

.password-toggle-btn {
    position: absolute;
    right: 12px;
    top: calc(50% - 12px);
    transform: translateY(-50%);
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    padding: 0;
    border-radius: 4px;
    transition: color 0.3s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 24px;
    width: 24px;
    opacity: 1;
    visibility: visible;
}
.password-toggle-btn i {
    font-size: 0.9rem;
    line-height: 1;
}

/* Actions du formulaire */
.form_actions {
    display: flex;
    justify-content: center;
}

.signin_submit_btn {
    padding: 16px 32px;
    font-size: 1.1rem;
    font-weight: 600;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.signin_submit_btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--primary-shadow);
}

.signin_submit_btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.signin_submit_btn .fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Messages d'erreur */
.signin_form .form_group .error-message {
    color: var(--danger-color);
    font-size: 0.8rem;
    margin-top: 4px;
    display: none;
}

.signin_form .form_group.error input {
    border-color: var(--danger-color);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.signin_form .form_group.error .error-message {
    display: block;
}

/* Messages de succès */
.signin_form .success-message {
    background: var(--success-light);
    color: var(--success-color);
    padding: 12px 16px;
    border-radius: 6px;
    border: 1px solid var(--success-border);
    margin-bottom: 20px;
    display: none;
}

.signin_form .success-message.show {
    display: block;
}

.conectionForm input{
    border: 1px solid #2260FF!important;
    border-radius: 8px!important;
    padding: 14px 16px!important;
}
.conectionForm .forminator-field:not(.forminator-is_active):not(.forminator-is_filled) label:not(.forminator-checkbox) {
    padding-left: 16px!important;
    transform: translateY(37px)!important;
    margin-bottom: 0!important;

}
.conectionForm .forminator-button{
    width: 100%!important;
    border-radius: 8px!important;
}

/* Responsive */
@media (max-width: 768px) {
    .signin_container {
        margin: 20px;
        padding: 24px 16px;
    }
    
    .signin_title {
        font-size: 1.5rem;
        margin-bottom: 24px;
    }
    
    .signin_form .form_row {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .signin_form .form_group input {
        padding: 12px 14px;
        font-size: 0.9rem;
    }
    
    .signin_submit_btn {
        padding: 14px 24px;
        font-size: 1rem;
        min-width: 160px;
    }
}