/* GASQUY Contact Form - Frontend Styles */

.gasquy-contact-wrapper {
    max-width: 600px;
    margin: 0 auto;
    padding: 30px;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.gasquy-contact-title {
    font-size: 28px;
    font-weight: 600;
    color: #333;
    margin-bottom: 25px;
    text-align: center;
}

.gasquy-contact-form {
    width: 100%;
}

.gasquy-form-group {
    margin-bottom: 20px;
}

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

.gasquy-label .required {
    color: #e74c3c;
    margin-left: 3px;
}

.gasquy-label .optional {
    color: #95a5a6;
    font-weight: 400;
    font-size: 12px;
}

.gasquy-input,
.gasquy-textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.gasquy-input:focus,
.gasquy-textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

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

.gasquy-submit-btn {
    width: 100%;
    padding: 14px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.gasquy-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

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

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

.gasquy-submit-btn .button-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Messages */
#gasquy-contact-messages {
    margin-bottom: 20px;
}

.gasquy-message {
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideIn 0.3s ease;
}

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

.gasquy-message-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.gasquy-message-error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.gasquy-message::before {
    content: '';
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    background-size: contain;
}

.gasquy-message-success::before {
    content: '✓';
    display: flex;
    align-items: center;
    justify-content: center;
    background: #28a745;
    color: white;
    border-radius: 50%;
    font-weight: bold;
}

.gasquy-message-error::before {
    content: '✕';
    display: flex;
    align-items: center;
    justify-content: center;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    font-weight: bold;
}

/* Responsive */
@media (max-width: 768px) {
    .gasquy-contact-wrapper {
        padding: 20px;
        margin: 0 15px;
    }
    
    .gasquy-contact-title {
        font-size: 24px;
    }
    
    .gasquy-input,
    .gasquy-textarea {
        font-size: 16px; /* Évite le zoom sur iOS */
    }
}

/* reCAPTCHA responsive */
.g-recaptcha {
    transform: scale(1);
    transform-origin: 0 0;
}

@media (max-width: 400px) {
    .g-recaptcha {
        transform: scale(0.9);
    }
}

/* Animation de validation */
.gasquy-input.error,
.gasquy-textarea.error {
    border-color: #e74c3c;
    animation: shake 0.4s ease;
}

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

/* RGPD Checkbox */
.gasquy-gdpr-group {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.gasquy-gdpr-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    line-height: 1.5;
    cursor: pointer;
}

.gasquy-checkbox {
    margin-top: 3px;
    cursor: pointer;
    width: 18px;
    height: 18px;
}

.gasquy-gdpr-text {
    flex: 1;
    color: #666;
}

.gasquy-privacy-link {
    color: #667eea;
    text-decoration: underline;
    margin-left: 5px;
}

.gasquy-privacy-link:hover {
    color: #5568d3;
}

/* Form description */
.gasquy-contact-description {
    text-align: center;
    color: #666;
    font-size: 14px;
    margin-top: -10px;
    margin-bottom: 20px;
    font-style: italic;
}

/* Loading state */
.gasquy-contact-form.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* File upload */
.gasquy-file-input {
    width: 100%;
    padding: 10px;
    border: 2px dashed #e0e0e0;
    border-radius: 6px;
    background: #f9f9f9;
    cursor: pointer;
    transition: all 0.3s ease;
}

.gasquy-file-input:hover {
    border-color: #667eea;
    background: #f0f4ff;
}

.gasquy-file-info {
    font-size: 12px;
    color: #888;
    margin-top: 5px;
    font-style: italic;
}

/* Select custom field */
select.gasquy-input {
    appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg fill="%23667eea" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 35px;
}
