/**
 * Styles pour les attestations de présence
 */

.iacf-attestation-section {
    margin: 30px 0;
    padding: 20px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.iacf-attestation-section h3 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 18px;
    font-weight: 600;
}

.iacf-attestation-section p {
    margin: 0 0 15px 0;
    color: #666;
    font-size: 14px;
}

.iacf-generate-attestation,
.iacf-attestation-download {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: #0073aa;
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.iacf-generate-attestation:hover,
.iacf-attestation-download:hover {
    background: #005a87;
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 115, 170, 0.3);
}

.iacf-generate-attestation:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.iacf-attestation-download {
    background: #46b450;
}

.iacf-attestation-download:hover {
    background: #389a41;
    box-shadow: 0 2px 8px rgba(70, 180, 80, 0.3);
}

.iacf-attestation-loading {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #666;
    font-size: 14px;
}

.iacf-attestation-loading .spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Styles pour les icônes */
.iacf-generate-attestation .dashicons,
.iacf-attestation-download .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* Responsive */
@media (max-width: 768px) {
    .iacf-attestation-section {
        margin: 20px 0;
        padding: 15px;
    }
    
    .iacf-generate-attestation,
    .iacf-attestation-download {
        width: 100%;
        justify-content: center;
        padding: 15px 20px;
    }
}

/* Messages de notification */
.iacf-message {
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Intégration avec WooCommerce */
.woocommerce-order-details .iacf-attestation-section {
    margin-top: 30px;
    border-left: 4px solid #0073aa;
}

.woocommerce-view-order .iacf-attestation-section {
    margin-top: 30px;
    border-left: 4px solid #0073aa;
}

/* Style pour les pages de compte */
.woocommerce-MyAccount-content .iacf-attestation-section {
    background: #fff;
    border: 1px solid #e5e5e5;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Amélioration de l'accessibilité */
.iacf-generate-attestation:focus,
.iacf-attestation-download:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* État de chargement amélioré */
.iacf-attestation-loading {
    opacity: 0.8;
}

.iacf-attestation-loading .spinner {
    border-top-color: #0073aa;
}
