/**
 * Styles pour le formulaire de candidature CPME
 */

.tcpme-form-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 30px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tcpme-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 3px solid #2563eb;
}

.tcpme-header h1 {
    color: #1e40af;
    font-size: 32px;
    margin: 0 0 10px 0;
}

.tcpme-header h2 {
    color: #2563eb;
    font-size: 20px;
    font-weight: normal;
    margin: 0 0 10px 0;
}

.tcpme-subtitle {
    color: #666;
    font-size: 14px;
}

/* Barre de progression */
.tcpme-progress {
    margin-bottom: 30px;
}

.tcpme-progress-bar {
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.tcpme-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #2563eb 0%, #3b82f6 100%);
    transition: width 0.3s ease;
}

.tcpme-progress-text {
    text-align: center;
    font-size: 14px;
    color: #666;
    font-weight: 600;
}

.tcpme-autosave-indicator {
    text-align: center;
    margin-top: 5px;
    min-height: 20px;
}

.tcpme-autosave-text {
    font-size: 12px;
    color: #10b981;
}

/* Sections */
.tcpme-section {
    margin-bottom: 30px;
}

.tcpme-section h2 {
    color: #1e40af;
    font-size: 24px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e5e7eb;
}

.tcpme-subsection {
    margin-bottom: 30px;
    padding: 20px;
    background: #f9fafb;
    border-radius: 6px;
}

.tcpme-subsection h3 {
    color: #374151;
    font-size: 18px;
    margin: 0 0 10px 0;
}

.tcpme-description {
    color: #6b7280;
    font-size: 14px;
    margin: 0 0 15px 0;
}

/* Champs de formulaire */
.tcpme-field {
    margin-bottom: 20px;
}

.tcpme-field label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
    font-size: 14px;
}

.tcpme-field input[type="text"],
.tcpme-field input[type="email"],
.tcpme-field input[type="tel"],
.tcpme-field input[type="url"],
.tcpme-field input[type="date"],
.tcpme-field select,
.tcpme-field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
}

.tcpme-field input:focus,
.tcpme-field select:focus,
.tcpme-field textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.tcpme-field textarea {
    resize: vertical;
    min-height: 100px;
}

.tcpme-field input[type="file"] {
    padding: 8px;
    border: 2px dashed #d1d5db;
    border-radius: 4px;
    cursor: pointer;
}

.tcpme-file-preview {
    margin-top: 10px;
    padding: 10px;
    background: #f9fafb;
    border-radius: 4px;
    display: none;
}

.tcpme-file-preview.has-file {
    display: block;
}

.tcpme-file-preview img {
    max-width: 200px;
    max-height: 200px;
    border-radius: 4px;
}

/* Radio et checkbox */
.tcpme-radio-group {
    display: flex;
    gap: 20px;
    margin-top: 8px;
}

.tcpme-radio-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: normal;
    cursor: pointer;
}

.tcpme-checkbox-label {
    display: flex !important;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
}

.tcpme-checkbox-label input[type="checkbox"] {
    margin-top: 4px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Intro et info boxes */
.tcpme-intro {
    padding: 20px;
    background: #eff6ff;
    border-left: 4px solid #2563eb;
    border-radius: 4px;
    margin-bottom: 20px;
}

.tcpme-trophees-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.tcpme-info-card {
    padding: 20px;
    background: white;
    border-radius: 6px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.tcpme-info-card h3 {
    font-size: 18px;
    margin: 0 0 10px 0;
    color: #1e40af;
}

.tcpme-contact {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
    font-size: 14px;
}

.tcpme-validation-box {
    padding: 25px;
    background: #f0fdf4;
    border: 2px solid #10b981;
    border-radius: 8px;
}

.tcpme-validation-box h3 {
    color: #065f46;
    margin-top: 0;
}

.tcpme-info-box {
    margin-top: 20px;
    padding: 15px;
    background: #fffbeb;
    border-left: 4px solid #f59e0b;
    border-radius: 4px;
}

.tcpme-info-box ul {
    margin: 10px 0 0 0;
    padding-left: 20px;
}

.tcpme-info-box li {
    margin-bottom: 8px;
}

/* Navigation */
.tcpme-navigation {
    display: flex;
    gap: 15px;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #e5e7eb;
}

.tcpme-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.tcpme-btn-primary {
    background: #2563eb;
    color: white;
}

.tcpme-btn-primary:hover {
    background: #1d4ed8;
}

.tcpme-btn-secondary {
    background: #f3f4f6;
    color: #374151;
}

.tcpme-btn-secondary:hover {
    background: #e5e7eb;
}

.tcpme-btn-success {
    background: #10b981;
    color: white;
}

.tcpme-btn-success:hover {
    background: #059669;
}

.tcpme-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Message de fermeture */
.tcpme-closed-message {
    max-width: 600px;
    margin: 60px auto;
    padding: 40px;
    text-align: center;
    background: #fef2f2;
    border: 2px solid #ef4444;
    border-radius: 8px;
}

.tcpme-closed-message h2 {
    color: #991b1b;
    margin-top: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .tcpme-form-container {
        padding: 20px;
        margin: 20px 10px;
    }
    
    .tcpme-header h1 {
        font-size: 24px;
    }
    
    .tcpme-header h2 {
        font-size: 16px;
    }
    
    .tcpme-trophees-info {
        grid-template-columns: 1fr;
    }
    
    .tcpme-navigation {
        flex-direction: column;
    }
    
    .tcpme-btn {
        width: 100%;
    }
}


/* Messages d'erreur */
.tcpme-field.has-error input,
.tcpme-field.has-error textarea,
.tcpme-field.has-error select {
    border-color: #ef4444 !important;
    background-color: #fef2f2;
}

.tcpme-field-error {
    color: #dc2626;
    font-size: 13px;
    margin-top: 5px;
    padding: 8px 12px;
    background: #fee2e2;
    border-left: 3px solid #ef4444;
    border-radius: 4px;
    animation: slideDown 0.3s ease-out;
}

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

.tcpme-field.has-error label {
    color: #dc2626;
}
