/* Styles pour la section des consentements */
.consent-section {
    padding: 20px;
    background: #fff;
    border-radius: 10px;
}

.consent-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.consent-header i {
    color: #0056b3;
    font-size: 24px;
}

.consent-header h4 {
    margin: 0;
    color: #333;
    font-size: 20px;
}

.consent-box {
    background: #1a1a1a;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

.custom-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    cursor: pointer;
    position: relative;
    padding-left: 35px;
    user-select: none;
}

.custom-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    left: 0;
    height: 24px;
    width: 24px;
    background-color: transparent;
    border: 2px solid #fff;
    border-radius: 4px;
}

.custom-checkbox:hover input ~ .checkmark {
    background-color: rgba(255, 255, 255, 0.1);
}

.custom-checkbox input:checked ~ .checkmark {
    background-color: #0056b3;
    border-color: #0056b3;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.custom-checkbox input:checked ~ .checkmark:after {
    display: block;
}

.custom-checkbox .checkmark:after {
    left: 8px;
    top: 4px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.label-text {
    color: #fff;
    font-size: 14px;
    line-height: 1.4;
}

.consent-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 8px;
    color: #666;
}

.consent-footer i {
    color: #0056b3;
}

.alert-info {
    background-color: #e3f2fd;
    border-color: #90caf9;
    color: #0d47a1;
    margin-bottom: 2rem;
}

.alert-secondary {
    background-color: #f5f5f5;
    border: none;
    border-radius: 8px;
    color: #666;
    margin-top: 2rem;
}

.alert i {
    color: inherit;
}

/* Style pour les cases à cocher invalides */
.consent-box.invalid {
    border: 1px solid #dc3545;
}

.consent-box.invalid .form-check-input {
    border-color: #dc3545;
}

/* Animation pour les messages d'erreur */
.invalid-feedback {
    display: none;
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    animation: fadeIn 0.3s ease;
}

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

.consent-group {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
}

.consent-check {
    background-color: #000;
    color: #fff;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
    transition: all 0.3s ease;
}

.consent-check:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.consent-check input[type="checkbox"] {
    margin-top: 0.25rem;
    margin-right: 1rem;
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid #fff;
    border-radius: 3px;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    position: relative;
    background-color: transparent;
}

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

.consent-check input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 0.8rem;
    font-weight: bold;
}

.consent-text {
    flex: 1;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #495057;
}

.consent-text a {
    color: #0d6efd;
    text-decoration: none;
}

.consent-text a:hover {
    text-decoration: underline;
}

.consent-info {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 0.75rem;
    margin-top: 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
}

.consent-required {
    color: #dc3545;
    margin-left: 0.25rem;
}

/* Style pour les messages d'erreur */
.consent-check.invalid {
    border: 1px solid #dc3545;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Message de sécurité en bas */
.consent-security-message {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 0.75rem;
    margin-top: 1.5rem;
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    color: #6c757d;
}

.consent-security-message i {
    margin-right: 0.5rem;
    color: #198754;
}

/* Style pour les boutons dans la section consentement */
.consent-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #dee2e6;
}

/* Ajustement des marges pour les boutons de navigation */
.form-navigation {
    margin: 0;
    padding: 1rem 0;
}

/* Style pour les cases à cocher requises */
.required-checkbox {
    position: relative;
}

.required-checkbox::after {
    content: '*';
    color: #dc3545;
    position: absolute;
    right: -10px;
    top: 0;
}

/* Responsive Design */
@media (max-width: 991.98px) {
    .consent-section {
        padding: 1.5rem;
    }

    .consent-check {
        padding: 0.875rem;
    }

    .consent-text {
        font-size: 0.9rem;
    }
}

@media (max-width: 767.98px) {
    .consent-section {
        padding: 1rem;
    }

    .consent-check {
        padding: 0.75rem;
        margin-bottom: 0.75rem;
    }

    .consent-text {
        font-size: 0.85rem;
    }

    .consent-info {
        font-size: 0.8rem;
        padding: 0.625rem;
    }

    .consent-actions {
        flex-direction: column;
        gap: 0.75rem;
    }

    .consent-actions button {
        width: 100%;
    }
}

@media (max-width: 575.98px) {
    .consent-section {
        padding: 0.75rem;
    }

    .consent-check {
        padding: 0.625rem;
    }

    .consent-text {
        font-size: 0.8rem;
        line-height: 1.4;
    }

    .consent-info {
        font-size: 0.75rem;
        padding: 0.5rem;
    }
}
