/* Form Title */
.form-title {
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    color: #c43b3b;
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    padding-bottom: 20px;
}

.form-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #c43b3b 0%, #a32929 100%);
    border-radius: 2px;
}

/* Modern Contact Form Styles */
.modern-contact-form {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 30px;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

.modern-input,
.modern-select,
.modern-textarea {
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    padding: 16px 20px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #fafafa;
    color: #333;
}

.modern-input:focus,
.modern-select:focus,
.modern-textarea:focus {
    border-color: #c43b3b;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(196, 59, 59, 0.1);
    outline: none;
}

.modern-input::placeholder,
.modern-textarea::placeholder {
    color: #999;
    font-weight: 400;
}

.modern-select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c43b3b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 20px;
    padding-right: 45px;
    cursor: pointer;
    min-height: 56px;
    height: auto;
    white-space: normal;
    line-height: 1.4;
}

.modern-select option {
    padding: 10px;
}

.modern-textarea {
    resize: vertical;
    min-height: 150px;
    font-family: inherit;
}

.modern-submit-btn {
    background: linear-gradient(135deg, #c43b3b 0%, #a32929 100%);
    border: none;
    border-radius: 12px;
    padding: 16px 50px;
    font-size: 18px;
    font-weight: 600;
    color: white;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(196, 59, 59, 0.3);
}

.modern-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(196, 59, 59, 0.4);
    background: linear-gradient(135deg, #d44444 0%, #b82e2e 100%);
}

.modern-submit-btn:active {
    transform: translateY(0);
}

.modern-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.form-group {
    margin-bottom: 25px;
}

.modern-contact-form .help-block.with-errors {
    color: #dc3545;
    font-size: 14px;
    margin-top: 8px;
    font-weight: 500;
}

.modern-input.is-invalid,
.modern-select.is-invalid,
.modern-textarea.is-invalid {
    border-color: #dc3545;
    background: #fff5f5;
}

.modern-input:valid,
.modern-select:valid,
.modern-textarea:valid {
    border-color: #28a745;
}

/* Animation pour le champ customSubject */
#customSubjectField {
    animation: slideDown 0.3s ease;
}

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

/* Modal de message */
.message-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    animation: fadeIn 0.3s ease;
}

.message-modal-content {
    position: relative;
    background-color: #fff;
    margin: 10% auto;
    padding: 30px 40px;
    border-radius: 16px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s ease;
}

.message-modal-content.success {
    border-left: 6px solid #28a745;
}

.message-modal-content.error {
    border-left: 6px solid #dc3545;
}

.message-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    transition: color 0.3s ease;
    line-height: 1;
}

.message-modal-close:hover {
    color: #333;
}

.message-modal-icon {
    font-size: 48px;
    margin-bottom: 15px;
    text-align: center;
}

.message-modal-icon.success {
    color: #28a745;
}

.message-modal-icon.error {
    color: #dc3545;
}

.message-modal-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 15px;
    text-align: center;
}

.message-modal-title.success {
    color: #155724;
}

.message-modal-title.error {
    color: #721c24;
}

.message-modal-body {
    font-size: 16px;
    line-height: 1.6;
    text-align: center;
    color: #333;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* Hide old message container */
#msgSubmit {
    display: none !important;
}

/* Character counter */
.char-counter {
    font-size: 13px;
    color: #999;
    text-align: right;
    margin-top: 5px;
    transition: color 0.3s ease;
}

.char-counter span {
    font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
    .modern-contact-form {
        padding: 30px 20px;
        border-radius: 15px;
    }

    .modern-input,
    .modern-select,
    .modern-textarea {
        padding: 14px 16px;
        font-size: 15px;
    }

    .modern-submit-btn {
        padding: 14px 40px;
        font-size: 16px;
        width: 100%;
    }

    .char-counter {
        font-size: 12px;
    }
}
