/**
 * Formulaire de Contact
 * Design moderne et accessible
 */

.contact-form-section {
    padding: 80px 20px;
}

.contact-form-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

.contact-form-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 10px;
    text-align: center;
}

.contact-form-subtitle {
    font-size: 18px;
    margin-bottom: 40px;
    text-align: center;
    opacity: 0.8;
}

/* Messages */
.contact-form-messages {
    margin-bottom: 30px;
    padding: 15px 20px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
}

.contact-form-messages.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.contact-form-messages.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Form Grid */
.starter-contact-form {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}

/* Form Fields */
.form-field {
    display: flex;
    flex-direction: column;
}

.form-field-full {
    grid-column: 1 / -1;
}

.form-field label {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
    display: block;
}

.form-field .required {
    color: #dc3545;
}

.form-field .optional {
    font-weight: 400;
    color: #6c757d;
    font-size: 12px;
}

.form-field input[type="text"],
.form-field input[type="email"],
.form-field input[type="tel"],
.form-field textarea {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: border-color 0.3s, box-shadow 0.3s;
    font-family: inherit;
}

.form-field input:focus,
.form-field textarea:focus {
    outline: none;
    border-color: #4A90E2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.form-field textarea {
    resize: vertical;
    min-height: 120px;
}

/* Validation states */
.form-field.error input,
.form-field.error textarea {
    border-color: #dc3545;
}

.form-field.success input,
.form-field.success textarea {
    border-color: #28a745;
}

.form-field .error-message {
    font-size: 14px;
    color: #dc3545;
    margin-top: 5px;
    display: none;
}

.form-field.error .error-message {
    display: block;
}

/* Checkbox RGPD */
.form-field-checkbox {
    margin: 20px 0;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.6;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 10px;
    margin-top: 3px;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checkbox-label span {
    flex: 1;
}

/* Submit Button */
.form-submit {
    text-align: center;
    margin-top: 30px;
}

.submit-button {
    background: #4A90E2;
    color: white;
    border: none;
    padding: 14px 40px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 180px;
    justify-content: center;
}

.submit-button:hover {
    background: #357ABD;
    transform: translateY(-2px);
}

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

.submit-button:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.submit-button .button-loader {
    display: inline-block;
}

/* Spinner */
.spinner {
    animation: rotate 2s linear infinite;
    width: 20px;
    height: 20px;
}

.spinner .path {
    stroke: white;
    stroke-linecap: round;
    animation: dash 1.5s ease-in-out infinite;
}

@keyframes rotate {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes dash {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }
    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .contact-form-section {
        padding: 60px 15px;
    }

    .starter-contact-form {
        padding: 30px 20px;
    }

    .contact-form-title {
        font-size: 28px;
    }

    .contact-form-subtitle {
        font-size: 16px;
    }
}
