/**
 * Styles pour l'interface publique
 */

/* Wrapper principal */
.cpme88-events-wrapper {
    margin: 40px 0;
}

/* Message vide */
.cpme88-events-empty {
    text-align: center;
    padding: 40px 20px;
    background: #f6f7f7;
    border-radius: 8px;
}

.cpme88-events-empty p {
    margin: 0;
    color: #646970;
    font-size: 16px;
}

/* Grille d'événements */
.cpme88-events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

/* Carte d'événement */
.cpme88-event-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 24px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.cpme88-event-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.cpme88-event-card.is-full {
    opacity: 0.7;
}

/* En-tête de la carte */
.cpme88-event-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f0f0f0;
}

.cpme88-event-title {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
    flex: 1;
    padding-right: 10px;
}

/* Badges */
.cpme88-event-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.cpme88-badge-available {
    background: #d1f4e0;
    color: #00a32a;
}

.cpme88-badge-full {
    background: #f8d7da;
    color: #d63638;
}

/* Métadonnées */
.cpme88-event-meta {
    margin-bottom: 16px;
}

.cpme88-event-meta > div {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    color: #646970;
    font-size: 14px;
}

.cpme88-event-meta .dashicons {
    margin-right: 8px;
    color: #0073aa;
}

/* Description */
.cpme88-event-description {
    margin-bottom: 20px;
    color: #444;
    font-size: 14px;
    line-height: 1.6;
}

/* Pied de carte */
.cpme88-event-footer {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
}

/* Boutons */
.cpme88-btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    width: 100%;
}

.cpme88-btn-primary {
    background: #0073aa;
    color: #fff;
}

.cpme88-btn-primary:hover {
    background: #005a87;
    color: #fff;
}

.cpme88-btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.cpme88-btn-secondary:hover {
    background: #e0e0e0;
}

.cpme88-btn-disabled {
    background: #f0f0f0;
    color: #999;
    cursor: not-allowed;
}

/* Modal */
.cpme88-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
}

.cpme88-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
}

.cpme88-modal-content {
    position: relative;
    max-width: 500px;
    margin: 50px auto;
    background: #fff;
    border-radius: 8px;
    padding: 32px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    animation: cpme88-modal-appear 0.3s ease;
}

@keyframes cpme88-modal-appear {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cpme88-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 32px;
    height: 32px;
}

.cpme88-modal-close:hover {
    color: #333;
}

.cpme88-modal-content h2 {
    margin-top: 0;
    margin-bottom: 24px;
    color: #1a1a1a;
}

/* Formulaire */
.cpme88-form-group {
    margin-bottom: 20px;
}

.cpme88-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.cpme88-form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.cpme88-form-control:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
}

.cpme88-form-message {
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.cpme88-form-message.success {
    background: #d1f4e0;
    color: #00a32a;
    border: 1px solid #00a32a;
}

.cpme88-form-message.error {
    background: #f8d7da;
    color: #d63638;
    border: 1px solid #d63638;
}

.cpme88-form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.cpme88-form-actions .cpme88-btn {
    flex: 1;
}

/* Responsive */
@media (max-width: 768px) {
    .cpme88-events-grid {
        grid-template-columns: 1fr;
    }
    
    .cpme88-modal-content {
        margin: 20px;
        padding: 24px;
    }
    
    .cpme88-event-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .cpme88-event-badge {
        margin-top: 8px;
    }
}
