/**
 * Contact Form 7 - Style Sam'Paille
 * À ajouter dans assets/css/contact-form.css
 */

/* Container principal */
.sp-form-container {
    max-width: 800px;
    margin: 0 auto;
    background: linear-gradient(135deg, var(--sp-black), var(--sp-gray-dark, #333));
    border-radius: 16px;
    padding: 3rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.sp-form-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--sp-gold), var(--sp-orange, #FFA500));
}

/* Header du formulaire */
.sp-form-header {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--sp-white);
}

.sp-form-header h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--sp-white);
}

.sp-form-header p {
    font-size: 1.1rem;
    opacity: 0.9;
    line-height: 1.6;
}

/* Grille du formulaire */
.sp-form-grid {
    display: grid;
    gap: 1.5rem;
}

.sp-form-group {
    position: relative;
    display: flex;
    flex-direction: column;
}

.sp-form-half {
    grid-column: span 1;
}

.sp-form-full {
    grid-column: span 2;
}

/* Responsive grid */
@media (min-width: 768px) {
    .sp-form-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .sp-form-half,
    .sp-form-full {
        grid-column: span 1;
    }
}

/* Labels */
.sp-form-label {
    font-size: 0.9rem;
    color: var(--sp-gold);
    font-weight: 500;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Champs de saisie */
.sp-form-control {
    width: 100% !important;
    padding: 1rem 1.5rem !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border: 2px solid rgba(255, 215, 0, 0.3) !important;
    border-radius: 8px !important;
    color: var(--sp-white) !important;
    font-size: 1rem !important;
    font-family: inherit !important;
    transition: all 0.3s ease !important;
    backdrop-filter: blur(10px);
    box-sizing: border-box !important;
}

.sp-form-control::placeholder {
    color: rgba(255, 255, 255, 0.6) !important;
    font-style: italic;
}

.sp-form-control:focus {
    outline: none !important;
    border-color: var(--sp-gold) !important;
    background: rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.2) !important;
}

/* Select spécifique */
select.sp-form-control {
    appearance: none !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%23FFD700' viewBox='0 0 16 16'%3e%3cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 1rem center !important;
    background-size: 16px !important;
    padding-right: 3rem !important;
}

/* Textarea */
textarea.sp-form-control {
    resize: vertical !important;
    min-height: 120px !important;
    line-height: 1.6 !important;
}

/* Checkboxes */
.sp-form-checkbox {
    flex-direction: row !important;
    align-items: flex-start !important;
    gap: 1rem;
}

.sp-checkbox {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px;
    margin: 0 !important;
    appearance: none !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border: 2px solid var(--sp-gold) !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    position: relative !important;
    transition: all 0.3s ease !important;
}

.sp-checkbox:checked {
    background: var(--sp-gold) !important;
}

.sp-checkbox:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--sp-black);
    font-size: 14px;
    font-weight: bold;
}

.sp-checkbox-label {
    flex: 1;
    color: var(--sp-white) !important;
    font-size: 0.95rem !important;
    line-height: 1.5 !important;
    margin: 0 !important;
    cursor: pointer !important;
}

.sp-checkbox-label a {
    color: var(--sp-gold) !important;
    text-decoration: underline !important;
}

.sp-checkbox-label a:hover {
    color: var(--sp-white) !important;
}

/* Bouton submit */
.sp-form-submit {
    grid-column: span 2;
    text-align: center;
    margin-top: 1rem;
}

@media (max-width: 767px) {
    .sp-form-submit {
        grid-column: span 1;
    }
}

.sp-btn-submit {
    background: linear-gradient(135deg, var(--sp-gold), var(--sp-orange, #FFA500)) !important;
    color: var(--sp-black) !important;
    border: none !important;
    padding: 1.25rem 3rem !important;
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    border-radius: 50px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.3) !important;
    min-width: 250px;
}

.sp-btn-submit:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 30px rgba(255, 215, 0, 0.5) !important;
    background: var(--sp-gold) !important;
}

.sp-btn-submit:active {
    transform: translateY(0) !important;
}

/* Info sous le bouton */
.sp-form-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
    color: var(--sp-gold);
    font-size: 0.9rem;
    font-weight: 500;
}

.sp-form-info svg {
    opacity: 0.7;
}

/* Messages d'erreur et succès */
.wpcf7-response-output {
    background: rgba(255, 255, 255, 0.1) !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 1rem 1.5rem !important;
    margin: 1.5rem 0 0 !important;
    color: var(--sp-white) !important;
    text-align: center !important;
    backdrop-filter: blur(10px);
}

.wpcf7-mail-sent-ok {
    background: rgba(76, 175, 80, 0.2) !important;
    border-left: 4px solid #4CAF50 !important;
}

.wpcf7-validation-errors,
.wpcf7-mail-sent-ng {
    background: rgba(244, 67, 54, 0.2) !important;
    border-left: 4px solid #F44336 !important;
}

.wpcf7-spam-blocked {
    background: rgba(255, 152, 0, 0.2) !important;
    border-left: 4px solid #FF9800 !important;
}

/* Champs avec erreur */
.wpcf7-not-valid {
    border-color: #F44336 !important;
    background: rgba(244, 67, 54, 0.1) !important;
}

.wpcf7-not-valid-tip {
    color: #F44336 !important;
    font-size: 0.85rem !important;
    margin-top: 0.5rem !important;
}

/* Loading */
.wpcf7-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-top: 2px solid var(--sp-gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 1rem;
}

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

/* Responsive */
@media (max-width: 768px) {
    .sp-form-container {
        padding: 2rem 1.5rem;
        margin: 1rem;
        border-radius: 12px;
    }
    
    .sp-form-header h3 {
        font-size: 1.75rem;
    }
    
    .sp-btn-submit {
        padding: 1rem 2rem !important;
        font-size: 1rem !important;
        min-width: 200px;
    }
    
    .sp-form-control {
        padding: 0.875rem 1.25rem !important;
    }
}

/* Animation d'apparition */
.sp-form-container {
    animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}