/* Styles pour le sidebar amélioré - Version corrigée pour éviter les conflits */

/* Conteneur principal du sidebar */
.sidebar {
    width: 100%;
    max-width: 350px;
    margin: 0 auto;
    padding: 0;
}

/* Widgets du sidebar uniquement */
.sidebar .sidebar-widget {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 32px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #f1f5f9;
}

.sidebar .sidebar-widget:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.sidebar .widget-header {
    padding: 24px 24px 16px;
    border-bottom: 1px solid #f1f5f9;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.sidebar .widget-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
}

.sidebar .title-icon {
    font-size: 18px;
    margin-right: 8px;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

/* Styles pour le formulaire d'inscription du sidebar */
.sidebar .registration-widget .widget-header {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.sidebar .registration-form {
    padding: 24px;
}

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

.sidebar .registration-form .input-wrapper,
.sidebar .registration-form .select-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.sidebar .registration-form .input-wrapper:focus-within,
.sidebar .registration-form .select-wrapper:focus-within {
    border-color: #4facfe;
    box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.1);
    background: #ffffff;
}

.sidebar .registration-form .input-icon {
    padding: 0 16px;
    color: #64748b;
    font-size: 14px;
    pointer-events: none;
}

.sidebar .registration-form .input-wrapper input,
.sidebar .registration-form .select-wrapper select {
    flex: 1;
    padding: 16px 16px 16px 4px;
    border: none;
    background: transparent;
    font-size: 14px;
    color: #1e293b;
    outline: none;
}

.sidebar .registration-form .input-wrapper input::placeholder {
    color: #94a3b8;
}

.sidebar .registration-form .btn-primary {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.sidebar .registration-form .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.sidebar .registration-form .btn-primary:active {
    transform: translateY(0);
}

.sidebar .registration-form .btn-icon {
    font-size: 14px;
    transition: transform 0.3s ease;
}

.sidebar .registration-form .btn-primary:hover .btn-icon {
    transform: translateX(4px);
}

/* Styles pour les cours du sidebar */
.sidebar .courses-widget .widget-header {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.sidebar .courses-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar .course-item {
    display: flex;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #f1f5f9;
    transition: all 0.3s ease;
}

.sidebar .course-item:last-child {
    border-bottom: none;
}

.sidebar .course-item:hover {
    background: #f8fafc;
}

.sidebar .course-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    color: white;
    font-size: 18px;
    margin-right: 16px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    transition: transform 0.3s ease;
}

.sidebar .course-content {
    flex: 1;
}

.sidebar .course-title {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    text-decoration: none;
    margin-bottom: 4px;
    line-height: 1.4;
}

.sidebar .course-title:hover {
    color: #667eea;
}

.sidebar .course-badge {
    font-size: 12px;
    padding: 4px 8px;
    background: #e0e7ff;
    color: #5145cd;
    border-radius: 6px;
    font-weight: 500;
}

/* Styles pour le certificat du sidebar */
.sidebar .certificate-widget .widget-header {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    color: #8b5a2b;
}

.sidebar .certificate-container {
    padding: 24px;
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.sidebar .certificate-container::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: sidebar-sparkle 3s ease-in-out infinite;
}

@keyframes sidebar-sparkle {
    0%, 100% { opacity: 0.3; transform: rotate(0deg); }
    50% { opacity: 0.6; transform: rotate(180deg); }
}

.sidebar .certificate-icon {
    font-size: 40px;
    color: #fbbf24;
    margin-bottom: 16px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.sidebar .certificate-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 4px 0;
    letter-spacing: 2px;
}

.sidebar .certificate-subtitle {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 8px 0;
    opacity: 0.9;
}

.sidebar .certificate-description {
    font-size: 12px;
    opacity: 0.8;
    line-height: 1.4;
}

.sidebar .certificate-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: #10b981;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.3);
}

/* Styles pour les événements du sidebar */
.sidebar .events-widget .widget-header {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    color: #065f46;
}

.sidebar .upcoming-events {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar .event-item {
    display: flex;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #f1f5f9;
    transition: all 0.3s ease;
}

.sidebar .event-item:last-child {
    border-bottom: none;
}

.sidebar .event-item:hover {
    background: #f8fafc;
}

.sidebar .event-date {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    margin-right: 16px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.sidebar .event-day {
    font-size: 18px;
    line-height: 1;
}

.sidebar .event-month {
    font-size: 12px;
    text-transform: uppercase;
    opacity: 0.8;
}

.sidebar .event-content {
    flex: 1;
}

.sidebar .event-title {
    margin: 0 0 4px 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
}

.sidebar .event-title a {
    color: #1e293b;
    text-decoration: none;
}

.sidebar .event-title a:hover {
    color: #667eea;
}

.sidebar .event-time {
    color: #64748b;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.sidebar .event-time i {
    font-size: 10px;
}

.sidebar .no-events {
    text-align: center;
    padding: 40px 24px;
    color: #64748b;
}

.sidebar .no-events-icon {
    font-size: 40px;
    display: block;
    margin-bottom: 16px;
    opacity: 0.5;
    color: #94a3b8;
}

/* Styles pour le contact du sidebar */
.sidebar .contact-widget .widget-header {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    color: #8b5a2b;
}

.sidebar .quick-contact {
    padding: 24px;
}

.sidebar .contact-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid #f1f5f9;
}

.sidebar .contact-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.sidebar .contact-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.sidebar .contact-content {
    flex: 1;
}

.sidebar .contact-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 4px;
}

.sidebar .contact-value {
    font-size: 14px;
    color: #64748b;
    line-height: 1.4;
}

.sidebar .contact-value a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s ease;
}

.sidebar .contact-value a:hover {
    color: #4c51bf;
}

/* Animation pulse spécifique au sidebar */
@keyframes sidebar-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Responsive spécifique au sidebar */
@media (max-width: 768px) {
    .sidebar {
        max-width: 100%;
        padding: 0 16px;
    }
    
    .sidebar .sidebar-widget {
        margin-bottom: 24px;
    }
    
    .sidebar .widget-header {
        padding: 20px 20px 16px;
    }
    
    .sidebar .registration-form,
    .sidebar .quick-contact {
        padding: 20px;
    }
    
    .sidebar .course-item,
    .sidebar .event-item {
        padding: 16px 20px;
    }
    
    .sidebar .certificate-container {
        padding: 20px;
    }
    
    .sidebar .course-icon,
    .sidebar .event-date {
        width: 40px;
        height: 40px;
    }
    
    .sidebar .course-icon {
        font-size: 16px;
    }
    
    .sidebar .event-day {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .sidebar .event-item {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    
    .sidebar .event-date {
        margin-right: 0;
    }
    
    .sidebar .contact-item {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    
    .sidebar .contact-icon {
        margin: 0 auto;
    }
}

/* Styles spécifiques pour les widgets WordPress par défaut dans le sidebar */
.sidebar .widget {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 32px;
    overflow: hidden;
    border: 1px solid #f1f5f9;
    padding: 24px;
}

.sidebar .widget .widget-title {
    margin: 0 0 20px 0;
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    padding-bottom: 12px;
    border-bottom: 2px solid #667eea;
}

.sidebar .widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar .widget li {
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
}

.sidebar .widget li:last-child {
    border-bottom: none;
}

.sidebar .widget a {
    color: #64748b;
    text-decoration: none;
    transition: color 0.3s ease;
}

.sidebar .widget a:hover {
    color: #667eea;
}