/* Conteneur principal V8 */
#chfond-calendar-container {
    max-width: 700px;
    margin: 20px auto;
    padding: 20px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

/* En-tête du calendrier */
.chfond-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
}

.chfond-calendar-header h2 {
    margin: 0;
    font-size: 24px;
    color: #333;
    font-weight: 600;
}

.chfond-nav-btn {
    padding: 8px 16px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.chfond-nav-btn:hover {
    background: #45a049;
}

/* Grille du calendrier */
.chfond-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    grid-auto-flow: dense;
}

#chfond-calendar-days {
    display: contents;
}

.chfond-calendar-day-header {
    padding: 10px;
    text-align: center;
    font-weight: 600;
    background: #f5f5f5;
    color: #666;
    border-radius: 5px;
    font-size: 14px;
}

.chfond-calendar-day {
    padding: 15px 10px;
    text-align: center;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    min-height: 60px;
    background: white;
    position: relative;
}

.chfond-calendar-day:hover {
    background: #f9f9f9;
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.chfond-calendar-day.other-month {
    color: #ccc;
    background: #fafafa;
}

.chfond-calendar-day.today {
    border: 2px solid #4CAF50;
    font-weight: bold;
}

.chfond-calendar-day.selected {
    background: #4CAF50;
    color: white;
    font-weight: bold;
}

.chfond-calendar-day.has-event {
    font-weight: 600;
    transition: all 0.3s;
}

.chfond-calendar-day.has-event-full {
    opacity: 0.8;
    position: relative;
}

.chfond-calendar-day.has-event-full::after {
    content: '●';
    position: absolute;
    top: 2px;
    right: 4px;
    font-size: 10px;
    color: #d32f2f;
}

.chfond-calendar-day.has-event:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.chfond-calendar-day.selected.has-event {
    background: #4CAF50 !important;
    color: white;
}

/* Détails des événements */
#chfond-events-details {
    margin-top: 30px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    border-left: 4px solid #4CAF50;
}

#chfond-events-details h3 {
    margin-top: 0;
    color: #333;
    font-size: 20px;
}

#chfond-selected-date {
    color: #4CAF50;
    font-weight: bold;
}

.chfond-event-item {
    background: white;
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.08);
    transition: transform 0.2s;
}

.chfond-event-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.12);
}

.chfond-event-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.chfond-event-description {
    color: #666;
    margin-bottom: 12px;
    line-height: 1.5;
}

.chfond-event-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 14px;
    color: #777;
    margin-bottom: 15px;
}

.chfond-event-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.chfond-event-meta-item:before {
    content: '•';
    color: #4CAF50;
    font-weight: bold;
    font-size: 16px;
}

.chfond-event-places {
    display: inline-block;
    padding: 5px 12px;
    background: #e8f5e9;
    color: #2e7d32;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.chfond-event-places.full {
    background: #ffebee;
    color: #c62828;
}

.chfond-event-registrants {
    margin: 15px 0;
    padding: 15px;
    background: #f0f7ff;
    border-left: 3px solid #2196F3;
    border-radius: 4px;
}

.chfond-event-registrants h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
    font-weight: 600;
    color: #1976D2;
}

.chfond-registrants-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 8px;
}

.chfond-registrants-list li {
    padding: 6px 12px;
    background: white;
    border-radius: 4px;
    font-size: 13px;
    color: #333;
    border: 1px solid #e3f2fd;
}

.chfond-registrants-list li:before {
    content: '👤 ';
    margin-right: 5px;
}

.chfond-btn-register {
    padding: 10px 20px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.3s;
}

.chfond-btn-register:hover {
    background: #45a049;
}

.chfond-btn-register:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Formulaire d'inscription */
#chfond-registration-form {
    margin-top: 30px;
    padding: 25px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

#chfond-registration-form h3 {
    margin-top: 0;
    color: #333;
    font-size: 20px;
    margin-bottom: 20px;
}

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

.chfond-form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
    font-size: 14px;
}

.chfond-form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.chfond-form-group input:focus {
    outline: none;
    border-color: #4CAF50;
}

.chfond-captcha-group {
    background: #f0f7ff;
    padding: 15px;
    border-radius: 5px;
    border-left: 4px solid #2196F3;
}

.chfond-captcha-group label {
    color: #1976D2;
}

#chfond-captcha-question {
    font-weight: bold;
    font-size: 18px;
    color: #0d47a1;
}

.chfond-form-actions {
    display: flex;
    gap: 10px;
    margin-top: 25px;
}

.chfond-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
}

.chfond-btn-primary {
    background: #4CAF50;
    color: white;
}

.chfond-btn-primary:hover {
    background: #45a049;
}

.chfond-btn-secondary {
    background: #f5f5f5;
    color: #333;
}

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

#chfond-registration-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 5px;
    font-weight: 500;
}

#chfond-registration-message.success {
    background: #e8f5e9;
    color: #2e7d32;
    border-left: 4px solid #4CAF50;
}

#chfond-registration-message.error {
    background: #ffebee;
    color: #c62828;
    border-left: 4px solid #f44336;
}

/* Bannière de confirmation */
.chfond-confirmation-banner {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    animation: slideDown 0.5s ease-out;
    max-width: 600px;
    width: 90%;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.chfond-confirmation-content {
    background: #4CAF50;
    color: white;
    padding: 20px 25px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    gap: 15px;
}

.chfond-confirmation-icon {
    font-size: 32px;
    font-weight: bold;
    background: white;
    color: #4CAF50;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.chfond-confirmation-text {
    flex: 1;
    line-height: 1.5;
}

.chfond-confirmation-text strong {
    font-size: 18px;
    display: block;
    margin-bottom: 5px;
}

/* Responsive */
@media (max-width: 768px) {
    #chfond-calendar-container {
        padding: 15px;
    }
    
    .chfond-calendar-header h2 {
        font-size: 18px;
    }
    
    .chfond-nav-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .chfond-calendar-day {
        padding: 10px 5px;
        min-height: 50px;
        font-size: 14px;
    }
    
    .chfond-calendar-day-header {
        font-size: 12px;
        padding: 8px 5px;
    }
    
    .chfond-form-actions {
        flex-direction: column;
    }
    
    .chfond-btn {
        width: 100%;
    }
}