/* Style pour l'affichage d'un seul événement - Format carré */

/* Container principal */
.cdfef-single-event-container {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Item d'événement carré */
.cdfef-single-event-item {
    position: relative;
    width: 100%;
    padding-bottom: 100%; /* Aspect ratio carré 1:1 */
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    background: #1a1a1a;
}

/* Image de fond */
.cdfef-single-event-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.7;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.cdfef-single-event-item:hover .cdfef-single-event-bg {
    opacity: 0.8;
    transform: scale(1.05);
}

/* Overlay gradient */
.cdfef-single-event-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, 
        rgba(0,0,0,0.9) 0%, 
        rgba(0,0,0,0.7) 40%, 
        rgba(0,0,0,0.3) 70%,
        transparent 100%);
}

/* Contenu positionné en absolu */
.cdfef-single-event-content {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 24px;
    color: white;
    z-index: 2;
}

/* Date en haut à droite */
.cdfef-single-date {
    position: absolute;
    top: 24px;
    right: 24px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 12px 16px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.cdfef-single-day {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1;
}

.cdfef-single-month {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
    text-transform: uppercase;
    margin-top: 4px;
}

/* Informations en bas */
.cdfef-single-info {
    margin-top: auto;
}

.cdfef-single-event-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 16px;
    line-height: 1.2;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.cdfef-single-event-title a {
    color: white;
    text-decoration: none;
}

.cdfef-single-event-title a:hover {
    text-decoration: underline;
}

.cdfef-single-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.cdfef-single-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.9);
}

.cdfef-single-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: rgba(255, 255, 255, 0.8);
}

/* Actions */
.cdfef-single-actions {
    display: flex;
    gap: 12px;
}

.cdfef-single-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    padding: 10px 20px !important;
    border: none !important;
    border-radius: 8px !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    flex: 1 !important;
    font-family: inherit !important;
    line-height: 1.2 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
}

.cdfef-single-button-primary {
    background: rgba(66, 103, 178, 0.9) !important;
    backdrop-filter: blur(10px);
    color: white !important;
}

.cdfef-single-button-primary:hover {
    background: rgba(66, 103, 178, 1) !important;
    transform: translateY(-2px) !important;
    color: white !important;
}

.cdfef-single-button-secondary {
    background: rgba(255, 255, 255, 0.2) !important;
    backdrop-filter: blur(10px);
    color: white !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
}

.cdfef-single-button-secondary:hover {
    background: rgba(255, 255, 255, 0.3) !important;
    color: white !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
}

.cdfef-single-button-icon {
    width: 18px;
    height: 18px;
}

/* Badge optionnel */
.cdfef-single-badge {
    position: absolute;
    top: 24px;
    left: 24px;
    padding: 6px 16px;
    background: linear-gradient(135deg, #4267B2 0%, #365899 100%);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(66, 103, 178, 0.3);
    z-index: 3;
}

/* État vide */
.cdfef-single-no-event {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: #f9fafb;
    border-radius: 16px;
    color: #6b7280;
    font-size: 1.125rem;
    padding: 32px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

/* Version sans image */
.cdfef-single-event-item.no-image {
    background: linear-gradient(135deg, #4267B2 0%, #1a1a1a 100%);
}

.cdfef-single-event-item.no-image .cdfef-single-event-overlay {
    background: rgba(0, 0, 0, 0.3);
}

/* Responsive */
@media (max-width: 480px) {
    .cdfef-single-event-container {
        max-width: 100%;
    }
    
    .cdfef-single-event-content {
        padding: 20px;
    }
    
    .cdfef-single-date {
        top: 20px;
        right: 20px;
        padding: 10px 14px;
    }
    
    .cdfef-single-day {
        font-size: 1.5rem;
    }
    
    .cdfef-single-event-title {
        font-size: 1.5rem;
    }
    
    .cdfef-single-button {
        padding: 8px 16px !important;
        font-size: 0.8125rem !important;
    }
    
    .cdfef-single-badge {
        top: 20px;
        left: 20px;
        padding: 4px 12px;
        font-size: 0.7rem;
    }
}

/* Animation */
.cdfef-single-event-item {
    animation: fadeIn 0.4s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Hover state global */
.cdfef-single-event-item:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

/* Loading skeleton */
.cdfef-single-event-skeleton {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    aspect-ratio: 1;
    border-radius: 16px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}