/* Dashboard principal */
.attestation-dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}

.attestation-header {
    margin-bottom: 30px;
    text-align: center;
}

.attestation-header h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin: 0;
    font-weight: 300;
}

.attestation-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: start;
}

/* Section formulaire */
.attestation-form-section {
    order: 1;
}

.form-card {
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid #e1e5e9;
}

.form-card h2 {
    margin-top: 0;
    color: #2c3e50;
    font-size: 1.5rem;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #3498db;
}

/* Section attestations */
.attestations-section {
    order: 2;
}

.attestations-card {
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid #e1e5e9;
    max-height: 80vh;
    overflow-y: auto;
}

.attestations-card h2 {
    margin-top: 0;
    color: #2c3e50;
    font-size: 1.5rem;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #27ae60;
}

/* Liste des attestations */
.attestations-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.attestation-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.attestation-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.attestation-info {
    flex: 1;
    margin-right: 15px;
}

.attestation-info h3 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 1.1rem;
    font-weight: 600;
}

.attestation-date,
.attestation-details {
    margin: 5px 0;
    color: #6c757d;
    font-size: 0.9rem;
}

.attestation-status {
    margin: 10px 0 0 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.validation-date {
    color: #6c757d;
    font-size: 0.8rem;
    font-style: italic;
}

.attestation-actions {
    flex-shrink: 0;
}

/* État vide */
.no-attestations {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.no-attestations-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.no-attestations h3 {
    margin: 0 0 10px 0;
    color: #495057;
}

.no-attestations p {
    margin: 0;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .attestation-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .attestation-form-section {
        order: 1;
    }
    
    .attestations-section {
        order: 2;
    }
    
    .attestation-item {
        flex-direction: column;
        align-items: stretch;
    }
    
    .attestation-info {
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .attestation-actions {
        align-self: flex-start;
    }
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.form-group input[type="text"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-submit {
    margin-top: 20px;
    text-align: right;
}

.button {
    display: inline-block;
    text-decoration: none;
    font-size: 13px;
    line-height: 2.15384615;
    min-height: 30px;
    margin: 0;
    padding: 0 10px;
    cursor: pointer;
    border-width: 1px;
    border-style: solid;
    -webkit-appearance: none;
    appearance: none;
    border-radius: 3px;
    white-space: nowrap;
    box-sizing: border-box;
    background: #f7f7f7;
    border-color: #ccc;
    color: #555;
    text-shadow: none;
}

.button.button-primary {
    background: #007cba;
    border-color: #007cba;
    color: #fff;
    text-decoration: none;
    text-shadow: none;
}

.button:hover {
    background: #f1f1f1;
    border-color: #999;
    color: #23282d;
}

.button.button-primary:hover {
    background: #006ba1;
    border-color: #006ba1;
    color: #fff;
}

#form-message {
    margin-top: 20px;
    padding: 10px;
    border-radius: 4px;
    display: none;
}

#form-message.success {
    background-color: #edfaef;
    border: 1px solid #46b450;
    color: #2e7d32;
}

#form-message.error {
    background-color: #fcf0f1;
    border: 1px solid #dc3232;
    color: #dc3232;
}

/* Styles pour les détails de formation */
#formation-details {
    margin-top: 20px;
    padding: 15px;
    background-color: #f9f9f9;
    border-left: 4px solid #0073aa;
    border-radius: 4px;
}

#formation-details h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #23282d;
    font-size: 16px;
}

#formation-info p {
    margin: 8px 0;
    font-size: 14px;
    line-height: 1.4;
}

#formation-info strong {
    color: #0073aa;
    font-weight: 600;
}

/* Amélioration de l'affichage du formulaire */
.form-group .description {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
    line-height: 1.4;
}

.form-group.has-error input,
.form-group.has-error select {
    border-color: #dc3232;
}

.help-block {
    color: #dc3232;
    font-size: 12px;
    margin-top: 5px;
}

/* Badges de statut */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-validated {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-pending {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.status-rejected {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Boutons améliorés */
.button-primary {
    background: #007cba;
    border-color: #007cba;
    color: #fff;
    text-decoration: none;
    text-shadow: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.button-primary:hover {
    background: #005a87;
    border-color: #005a87;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.button-disabled {
    background: #6c757d;
    border-color: #6c757d;
    color: #fff;
    cursor: not-allowed;
    opacity: 0.6;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Icônes */
.dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* Messages de formulaire améliorés */
#form-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 6px;
    display: none;
    font-weight: 500;
}

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

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

/* Animation pour les nouveaux éléments */
.attestation-item {
    animation: fadeInUp 0.5s ease-out;
}

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

/* Scrollbar personnalisée pour la liste des attestations */
.attestations-card::-webkit-scrollbar {
    width: 6px;
}

.attestations-card::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.attestations-card::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.attestations-card::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}
