/* ==============================================
   PAGE TIERS PAYANT & FORMULAIRE DEVIS
   ============================================== */

/* Hero Section */
.tiers-payant-hero {
    background: var(--black);
    color: white;
    padding: var(--space-16) 0 var(--space-12);
    border-top: 4px solid var(--yellow);
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.hero-title {
    font-size: var(--text-5xl);
    font-weight: var(--font-bold);
    margin-bottom: var(--space-4);
}

.hero-introduction {
    font-size: var(--text-lg);
    line-height: 1.6;
    opacity: 0.9;
}

/* Contenu éditorial */
.tiers-payant-content {
    background: white;
    padding: var(--space-16) 0;
}

.content-body {
    max-width: 800px;
    margin: 0 auto;
    font-size: var(--text-base);
    line-height: 1.8;
}

.content-body h2 {
    font-size: var(--text-3xl);
    font-weight: var(--font-bold);
    margin-top: var(--space-10);
    margin-bottom: var(--space-4);
    padding-left: var(--space-3);
    border-left: 4px solid var(--yellow);
}

.content-body h3 {
    font-size: var(--text-2xl);
    font-weight: var(--font-semibold);
    margin-top: var(--space-6);
    margin-bottom: var(--space-3);
}

.content-body p {
    margin-bottom: var(--space-4);
}

.content-body ul,
.content-body ol {
    margin-left: var(--space-6);
    margin-bottom: var(--space-4);
}

.content-body li {
    margin-bottom: var(--space-2);
}

/* Section formulaire */
.formulaire-section {
    background: var(--white-warm);
    padding: var(--space-16) 0;
}

.formulaire-wrapper {
    max-width: 700px;
    margin: 0 auto;
}

.formulaire-header {
    text-align: center;
    margin-bottom: var(--space-10);
}

.formulaire-title {
    font-size: var(--text-4xl);
    font-weight: var(--font-bold);
    color: var(--black);
    margin-bottom: var(--space-3);
}

.formulaire-subtitle {
    font-size: var(--text-lg);
    color: var(--text-light);
}

/* Formulaire */
.devis-form {
    background: white;
    padding: var(--space-10);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

/* Messages Django */
.messages {
    margin-bottom: var(--space-6);
}

.alert {
    padding: var(--space-4);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-3);
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.form-section {
    margin-bottom: var(--space-8);
    padding-bottom: var(--space-6);
    border-bottom: 1px solid var(--gray-light);
}

.form-section:last-of-type {
    border-bottom: none;
}

.form-section-title {
    font-size: var(--text-xl);
    font-weight: var(--font-bold);
    color: var(--black);
    margin-bottom: var(--space-6);
    padding-left: var(--space-3);
    border-left: 4px solid var(--yellow);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
}

.form-field {
    margin-bottom: var(--space-4);
}

.form-label {
    display: block;
    font-weight: var(--font-semibold);
    color: var(--black);
    margin-bottom: var(--space-2);
    font-size: var(--text-sm);
}

.required {
    color: #e53e3e;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: var(--space-3);
    border: 2px solid var(--gray-light);
    border-radius: var(--radius-md);
    font-size: var(--text-base);
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--yellow);
    box-shadow: 0 0 0 3px rgba(255, 209, 0, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

/* Upload de fichiers */
.form-upload {
    position: relative;
    border: 2px dashed var(--gray-light);
    border-radius: var(--radius-md);
    padding: var(--space-8);
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--white-warm);
}

.form-upload:hover {
    border-color: var(--yellow);
    background: white;
}

.upload-icon {
    font-size: 48px;
    margin-bottom: var(--space-3);
}

.upload-text p {
    margin: 0;
}

.upload-text strong {
    color: var(--black);
    font-weight: var(--font-semibold);
}

.upload-hint {
    font-size: var(--text-sm);
    color: var(--text-light);
    margin-top: var(--space-2);
}

.form-upload-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.upload-preview {
    margin-top: var(--space-4);
}

.file-info {
    background: var(--yellow);
    padding: var(--space-3);
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
}

.file-name {
    font-weight: var(--font-semibold);
    color: var(--black);
}

.file-size {
    font-size: var(--text-sm);
    color: var(--text-light);
}

/* Erreurs */
.form-errors,
.field-error {
    background: #fee;
    color: #c00;
    padding: var(--space-3);
    border-radius: var(--radius-sm);
    font-size: var(--text-sm);
    margin-top: var(--space-2);
}

/* Mentions RGPD */
.form-mentions {
    background: var(--white-warm);
    padding: var(--space-4);
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-6);
}

.form-mentions p {
    font-size: var(--text-sm);
    color: var(--text-light);
    margin: 0;
    line-height: 1.6;
}

.form-mentions a {
    color: var(--black);
    text-decoration: underline;
}

/* Bouton submit */
.form-submit {
    width: 100%;
    background: var(--yellow);
    color: var(--black);
    padding: var(--space-4);
    font-size: var(--text-lg);
    font-weight: var(--font-bold);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
}

.form-submit:hover {
    background: #FFC700;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 209, 0, 0.4);
}

/* FAQ Section */
.faq-section {
    background: white;
    padding: var(--space-16) 0;
}

.faq-title {
    font-size: var(--text-4xl);
    font-weight: var(--font-bold);
    text-align: center;
    margin-bottom: var(--space-10);
    color: var(--black);
}

.faq-item {
    max-width: 800px;
    margin: 0 auto var(--space-6);
    padding: var(--space-6);
    background: var(--white-warm);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--yellow);
}

.faq-question {
    font-size: var(--text-xl);
    font-weight: var(--font-semibold);
    color: var(--black);
    margin-bottom: var(--space-3);
}

.faq-answer {
    font-size: var(--text-base);
    line-height: 1.6;
    color: var(--text-color);
    margin: 0;
}

/* CTA Alternative */
.cta-alternative {
    background: var(--black);
    padding: var(--space-16) 0;
    text-align: center;
    color: white;
}

.cta-alternative h2 {
    font-size: var(--text-4xl);
    font-weight: var(--font-bold);
    margin-bottom: var(--space-8);
}

.cta-buttons {
    display: flex;
    gap: var(--space-4);
    justify-content: center;
    flex-wrap: wrap;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: var(--text-4xl);
    }
    
    .formulaire-title {
        font-size: var(--text-3xl);
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .cta-buttons {
        flex-direction: column;
    }
    
    .cta-buttons .btn {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .devis-form {
        padding: var(--space-6);
    }
    
    .hero-title {
        font-size: var(--text-3xl);
    }
    
    .faq-title {
        font-size: var(--text-3xl);
    }
}