/* Modal SMS Mode - Style Bootstrap-like sans les classes Bootstrap */

/* Overlay de la modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1050;
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    outline: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
}

.modal.fade {
    opacity: 0;
    transition: opacity 0.15s linear;
}

.modal.show {
    display: block !important;
    opacity: 1;
}

/* Container de la modal */
.modal-dialog {
    position: relative;
    width: auto;
    margin: 1.75rem auto;
    max-width: 500px;
    pointer-events: none;
}

.modal-content {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    pointer-events: auto;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 0.375rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    outline: 0;
}

/* Header de la modal */
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1rem;
    border-bottom: 1px solid #dee2e6;
    border-top-left-radius: calc(0.375rem - 1px);
    border-top-right-radius: calc(0.375rem - 1px);
}

.modal-title {
    margin: 0;
    line-height: 1.5;
    font-size: 1.25rem;
    font-weight: 500;
}

.close {
    padding: 0;
    background-color: transparent;
    border: 0;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
    color: #000;
    text-shadow: 0 1px 0 #fff;
    opacity: 0.5;
    cursor: pointer;
}

.close:hover {
    opacity: 0.75;
}

/* Body de la modal */
.modal-body {
    position: relative;
    flex: 1 1 auto;
    padding: 1rem;
}

/* Styles pour le formulaire SMS */
#registerSMSForm {
    width: 100%;
}

.sms_form_main {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.sms_form_main > div {
    display: flex;
    flex-direction: column;
}

.sms_form_main label {
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #212529;
}

.sms_form_main input[type="text"],
.sms_form_main input[type="tel"],
.sms_form_main input[type="email"] {
    display: block;
    width: 100%;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #212529;
    background-color: #fff;
    background-image: none;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.sms_form_main input[type="text"]:focus,
.sms_form_main input[type="tel"]:focus,
.sms_form_main input[type="email"]:focus {
    color: #212529;
    background-color: #fff;
    border-color: #86b7fe;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Section des checkboxes */
.sms_form_checkbox {
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 1rem;
    background-color: #f8f9fa;
}

.sms_form_checkbox > span {
    display: block;
    font-weight: 500;
    margin-bottom: 0.75rem;
    color: #212529;
}

.sms_form_checkbox > div {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.sms_form_checkbox > div:last-child {
    margin-bottom: 0;
}

.sms_form_checkbox input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    margin-right: 0.5rem;
    vertical-align: top;
    background-color: #fff;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    border: 1px solid #adb5bd;
    border-radius: 0.25em;
    cursor: pointer;
}

.sms_form_checkbox input[type="checkbox"]:checked {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.sms_form_checkbox label {
    margin-bottom: 0;
    cursor: pointer;
}

/* Section de consentement RGPD */
.sms_form_consent {
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
    background-color: #fff3cd;
    border-color: #ffecb5;
}

.sms_form_consent input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    margin-right: 0.5rem;
    vertical-align: top;
    float: left;
    margin-top: 0.25rem;
}

.sms_form_consent label {
    font-weight: 500;
    color: #664d03;
    margin-bottom: 0.5rem;
    display: block;
}

.sms_form_consent p {
    margin: 0;
    font-size: 0.875rem;
    color: #664d03;
    line-height: 1.4;
}

/* Bouton de soumission */
#registerSMSForm input[type="submit"] {
    display: inline-block;
    font-weight: 400;
    line-height: 1.5;
    color: #fff;
    text-align: center;
    text-decoration: none;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    background-color: #0d6efd;
    border: 1px solid #0d6efd;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    border-radius: 0.375rem;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    width: 100%;
}

#registerSMSForm input[type="submit"]:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
}

#registerSMSForm input[type="submit"]:focus {
    background-color: #0b5ed7;
    border-color: #0a58ca;
    box-shadow: 0 0 0 0.25rem rgba(49, 132, 253, 0.5);
}

/* Messages d'erreur et de succès */
.error_sms_register {
    padding: 0.75rem 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: 0.375rem;
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.error_sms_register h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 500;
}

.success_sms_register {
    padding: 0.75rem 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: 0.375rem;
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.success_sms_register h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 500;
}

/* Responsive */
@media (min-width: 576px) {
    .modal-dialog {
        max-width: 500px;
        margin: 1.75rem auto;
    }
}

@media (max-width: 575.98px) {
    .modal-dialog {
        margin: 1rem;
        max-width: calc(100% - 2rem);
    }
    
    .modal-content {
        border-radius: 0.375rem;
    }
    
    .sms_form_main {
        gap: 0.75rem;
    }
    
    .modal-header,
    .modal-body {
        padding: 0.75rem;
    }
}

/* Animation d'entrée */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translate(0, -50px);
    }
    to {
        opacity: 1;
        transform: translate(0, 0);
    }
}

.modal.show .modal-dialog {
    animation: modalFadeIn 0.3s ease-out;
}