/* Calendrier moderne pour les événements Facebook */

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

/* Titre du mois */
.cdfef-calendar-month {
    font-size: 2.5rem;
    font-weight: 300;
    color: #ffffff;
    margin: 60px 0 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    letter-spacing: -1px;
}

.cdfef-calendar-container > .cdfef-calendar-month:first-of-type {
    margin-top: 0;
}

/* Grille responsive */
.cdfef-calendar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

@media (max-width: 768px) {
    .cdfef-calendar-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* Carte d'événement */
.cdfef-event-card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.cdfef-event-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

/* Image container */
.cdfef-event-image {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.cdfef-event-image a {
    display: block;
    width: 100%;
    height: 100%;
}

.cdfef-event-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.cdfef-event-card:hover .cdfef-event-thumbnail {
    transform: scale(1.05);
}

/* Date overlay */
.cdfef-event-date-overlay {
    position: absolute;
    top: 20px;
    right: 20px;
    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-date-day {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1;
}

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

/* Contenu */
.cdfef-event-content {
    padding: 24px;
}

/* Titre */
.cdfef-event-title {
    font-size: 1.375rem;
    font-weight: 600;
    margin: 0 0 16px;
    line-height: 1.3;
}

.cdfef-event-title a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.2s ease;
}

.cdfef-event-title a:hover {
    color: #4267B2;
}

/* Métadonnées */
.cdfef-event-meta {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.cdfef-meta-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #6b7280;
    font-size: 0.9375rem;
}

.cdfef-icon {
    width: 18px;
    height: 18px;
    color: #9ca3af;
    flex-shrink: 0;
}

/* Description */
.cdfef-event-description {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: #4b5563;
    margin: 0 0 20px;
}

/* Boutons */
.cdfef-event-buttons {
    display: flex;
    gap: 8px;
    margin-top: auto;
    flex-wrap: wrap;
}

.cdfef-event-button {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 8px 12px !important;
    color: white !important;
    text-decoration: none !important;
    border: none !important;
    border-radius: 6px !important;
    font-size: 0.8125rem !important;
    font-weight: 500 !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    transition: all 0.2s ease !important;
    cursor: pointer !important;
    flex: 1 !important;
    min-width: 0 !important;
    justify-content: center !important;
    text-align: center !important;
    line-height: 1.2 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
}

.cdfef-event-button span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
    max-width: 100%;
}

.cdfef-button-facebook {
    background: #4267B2 !important;
}

.cdfef-button-facebook:hover {
    background: #365899 !important;
    transform: translateY(-2px) !important;
    color: white !important;
}

.cdfef-button-register {
    background: #16a34a !important;
}

.cdfef-button-register:hover {
    background: #15803d !important;
    transform: translateY(-2px) !important;
    color: white !important;
}

.cdfef-button-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* État vide */
.cdfef-calendar-empty {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
    font-size: 1.125rem;
}

/* Shortcode prochain événement */
.cdfef-next-event-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.cdfef-next-event-container .cdfef-event-card {
    max-width: 100%;
    margin: 0;
}

.cdfef-no-next-event {
    text-align: center;
    padding: 40px 20px;
    color: #6b7280;
    font-size: 1rem;
}

/* Slider des événements */
.cdfef-slider-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 50px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (max-width: 768px) {
    .cdfef-slider-container {
        padding: 0 40px;
    }
}

.cdfef-slider-wrapper {
    overflow: hidden;
    position: relative;
}

.cdfef-slider-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    gap: 20px;
}

.cdfef-slider-item {
    flex: 0 0 calc(33.333% - 14px);
    min-width: 0;
}

/* Tablette : 2 cartes */
@media (max-width: 992px) {
    .cdfef-slider-item {
        flex: 0 0 calc(50% - 10px);
    }
}

/* Mobile : 1 carte */
@media (max-width: 576px) {
    .cdfef-slider-item {
        flex: 0 0 100%;
    }
    
    .cdfef-slider-track {
        gap: 15px;
    }
}

/* Navigation du slider */
.cdfef-slider-nav {
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    background: rgba(255, 255, 255, 0.95) !important;
    border: none !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.3s ease !important;
    z-index: 2 !important;
    padding: 0 !important;
    margin: 0 !important;
    font-size: inherit !important;
    line-height: 1 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
}

.cdfef-slider-nav:hover {
    background: #ffffff !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
    transform: translateY(-50%) scale(1.1) !important;
    color: #374151 !important;
}

.cdfef-slider-nav:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    background: rgba(255, 255, 255, 0.95) !important;
}

.cdfef-slider-nav:disabled:hover {
    transform: translateY(-50%) !important;
}

.cdfef-slider-nav svg {
    width: 24px !important;
    height: 24px !important;
    color: #374151 !important;
}

.cdfef-slider-prev {
    left: 10px !important;
}

.cdfef-slider-next {
    right: 10px !important;
}

@media (max-width: 768px) {
    .cdfef-slider-prev {
        left: 5px !important;
    }
    
    .cdfef-slider-next {
        right: 5px !important;
    }
    
    .cdfef-slider-nav {
        width: 35px !important;
        height: 35px !important;
    }
}

/* Points de navigation (dots) */
.cdfef-slider-dots {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 8px !important;
    margin-top: 30px !important;
    padding: 10px !important;
}

.cdfef-slider-dot {
    width: 10px !important;
    height: 10px !important;
    border-radius: 50% !important;
    background: #d1d5db !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    padding: 0 !important;
    margin: 0 !important;
    font-size: 0 !important;
    line-height: 0 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    box-shadow: none !important;
}

.cdfef-slider-dot:hover {
    background: #9ca3af !important;
    transform: scale(1.2) !important;
    color: transparent !important;
}

.cdfef-slider-dot.active {
    background: #4267B2 !important;
    width: 30px !important;
    border-radius: 5px !important;
}

/* Ajustements pour le slider */
.cdfef-slider-container .cdfef-event-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.cdfef-slider-container .cdfef-event-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.cdfef-slider-container .cdfef-event-buttons {
    margin-top: auto;
}

/* Message pas d'événements */
.cdfef-no-events-slider {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
    font-size: 1.125rem;
}

/* Sélecteur de type d'inscription */
.cdfef-registration-type-selector {
    margin: 20px 0 30px;
    padding: 20px;
    border-bottom: 1px solid #e5e7eb;
}

.cdfef-registration-type-selector h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
    margin: 0 0 15px;
}

/* Étapes du formulaire */
.cdfef-step {
    display: none;
}

.cdfef-step.active {
    display: block;
}

/* Transitions entre étapes */
.cdfef-step {
    animation: fadeIn 0.3s ease;
}

.cdfef-step.fadeOut {
    animation: fadeOut 0.3s ease;
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(-20px);
    }
}

/* Boutons de navigation entre étapes */
.cdfef-continue-button,
.cdfef-back-button {
    padding: 10px 20px !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    border: none !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    text-transform: none !important;
    letter-spacing: normal !important;
}

.cdfef-continue-button {
    background: #4267B2 !important;
    color: white !important;
    width: 100% !important;
    text-align: center !important;
}

.cdfef-continue-button:hover {
    background: #365899 !important;
    transform: translateY(-2px) !important;
}

.cdfef-continue-button:disabled {
    background: #9ca3af !important;
    cursor: not-allowed !important;
    transform: none !important;
}

.cdfef-back-button {
    background: #6b7280 !important;
    color: white !important;
    margin-right: 10px !important;
}

.cdfef-back-button:hover {
    background: #4b5563 !important;
    transform: translateY(-2px) !important;
}

/* Ajustement des actions de formulaire pour inclure le bouton retour */
.cdfef-form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.cdfef-form-actions .cdfef-submit-button {
    flex: 1;
}

.cdfef-type-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.cdfef-type-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px;
    background: #f9fafb !important;
    border: 2px solid #e5e7eb !important;
    border-radius: 10px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    color: #6b7280 !important;
    font-size: 0.95rem !important;
    font-weight: 500 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    line-height: 1.2 !important;
}

.cdfef-type-button:hover {
    background: #f3f4f6 !important;
    border-color: #9ca3af !important;
    color: #374151 !important;
}

.cdfef-type-button.active {
    background: #eff6ff !important;
    border-color: #4267B2 !important;
    color: #4267B2 !important;
}

.cdfef-type-icon {
    width: 40px !important;
    height: 40px !important;
}

/* Sections de formulaire */

/* Checkbox personnalisé */
.cdfef-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 10px;
}

.cdfef-checkbox-label input[type="checkbox"] {
    margin-top: 2px;
    cursor: pointer;
}

/* Vérification SMS */
.cdfef-sms-verification {
    padding: 30px 0;
    text-align: center;
}

.cdfef-sms-verification h3 {
    font-size: 1.25rem;
    color: #1a1a1a;
    margin: 0 0 15px;
}

.cdfef-sms-verification p {
    color: #6b7280;
    margin-bottom: 30px;
}

.cdfef-phone-display {
    font-weight: 600;
    color: #374151;
}

#cdfef-sms-code {
    font-size: 1.5rem !important;
    text-align: center;
    letter-spacing: 0.5em;
    max-width: 200px;
    margin: 0 auto;
}

.cdfef-verify-button,
.cdfef-resend-button {
    display: inline-block;
    padding: 12px 24px !important;
    margin: 10px 5px;
    background: #4267B2 !important;
    color: white !important;
    border: none !important;
    border-radius: 6px !important;
    font-size: 0.9rem !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
}

.cdfef-resend-button {
    background: #6b7280 !important;
}

.cdfef-resend-button:disabled {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
}

.cdfef-verify-button:hover:not(:disabled),
.cdfef-resend-button:hover:not(:disabled) {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

/* Mobile responsive */
@media (max-width: 600px) {
    .cdfef-type-buttons {
        grid-template-columns: 1fr;
    }
    
    .cdfef-type-button {
        flex-direction: row;
        justify-content: center;
    }
    
    .cdfef-type-icon {
        width: 30px !important;
        height: 30px !important;
    }
}

/* Styles pour les champs dynamiques du formulaire */
#cdfef-dynamic-fields {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.cdfef-form-section {
}

.cdfef-form-section:last-child {
    border-bottom: none;
}

.cdfef-section-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #374151;
    margin: 0 0 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e5e7eb;
}

/* Largeurs des champs */
.cdfef-field-full {
    grid-column: 1 / -1;
}

.cdfef-field-half {
    grid-column: span 1;
}

.cdfef-field-third {
    grid-column: span 1;
}

@media (min-width: 768px) {
    .cdfef-form-row {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .cdfef-field-third {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Section de prévisualisation de contrat dans SMS */
.cdfef-contract-section {
    background: #f9fafb;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    text-align: left;
}

.cdfef-contract-section h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #374151;
    margin: 0 0 15px;
    text-align: center;
}

.cdfef-contract-container {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 20px;
    background: #ffffff;
    font-size: 0.875rem;
    line-height: 1.6;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cdfef-event-card {
    animation: fadeIn 0.5s ease forwards;
}

/* Délai d'animation progressif */
.cdfef-event-card:nth-child(1) { animation-delay: 0.05s; }
.cdfef-event-card:nth-child(2) { animation-delay: 0.1s; }
.cdfef-event-card:nth-child(3) { animation-delay: 0.15s; }
.cdfef-event-card:nth-child(4) { animation-delay: 0.2s; }
.cdfef-event-card:nth-child(5) { animation-delay: 0.25s; }
.cdfef-event-card:nth-child(6) { animation-delay: 0.3s; }

/* Modal d'inscription */
.cdfef-modal {
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    overflow-y: auto;
}

.cdfef-modal-content {
    background-color: #ffffff;
    padding: 40px;
    border-radius: 16px;
    max-width: 600px;
    width: 90%;
    margin: 40px auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    position: relative;
    animation: slideIn 0.3s ease;
}

.cdfef-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 300;
    color: #6b7280;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.cdfef-modal-close:hover {
    background: #f3f4f6;
    color: #1a1a1a;
}

.cdfef-modal-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 10px;
}

.cdfef-modal-event-info {
    color: #6b7280;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e5e7eb;
}

/* Formulaire */
.cdfef-registration-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cdfef-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 600px) {
    .cdfef-form-row {
        grid-template-columns: 1fr;
    }
}

.cdfef-form-group {
    display: flex;
    flex-direction: column;
}

.cdfef-form-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 6px;
}

.cdfef-form-group label .required {
    color: #ef4444;
}

.cdfef-form-group input,
.cdfef-form-group textarea {
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s ease;
    font-family: inherit;
}

.cdfef-form-group input:focus,
.cdfef-form-group textarea:focus {
    outline: none;
    border-color: #4267B2;
    box-shadow: 0 0 0 3px rgba(66, 103, 178, 0.1);
}

.cdfef-form-actions {
    margin-top: 10px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.cdfef-submit-button {
    width: 100% !important;
    padding: 12px 20px !important;
    background: #4267B2 !important;
    color: white !important;
    border: none !important;
    border-radius: 6px !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    line-height: 1.2 !important;
}

.cdfef-submit-button:hover {
    background: #365899;
    transform: translateY(-2px);
}

.cdfef-submit-button:disabled {
    background: #9ca3af;
    transform: none;
    cursor: not-allowed;
}

.cdfef-form-info {
    font-size: 0.875rem;
    color: #6b7280;
    text-align: center;
    margin-top: 12px;
}

/* Message de succès */
.cdfef-form-success {
    text-align: center;
    padding: 40px 20px;
}

.cdfef-success-icon {
    width: 64px;
    height: 64px;
    color: #16a34a;
    margin: 0 auto 20px;
}

.cdfef-form-success h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 10px;
}

.cdfef-form-success p {
    color: #6b7280;
    line-height: 1.6;
}

/* Mode sombre (optionnel) */
@media (prefers-color-scheme: dark) {
    .cdfef-calendar-container {
        color: #e5e7eb;
    }
    
    .cdfef-calendar-month {
        color: #f3f4f6;
        border-bottom-color: #374151;
    }
    
    .cdfef-event-card {
        background: #1f2937;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    }
    
    .cdfef-event-title a {
        color: #f3f4f6;
    }
    
    .cdfef-event-title a:hover {
        color: #60a5fa;
    }
    
    .cdfef-meta-item {
        color: #9ca3af;
    }
    
    .cdfef-event-description {
        color: #d1d5db;
    }
    
    .cdfef-event-button {
        background: #2563eb;
    }
    
    .cdfef-event-button:hover {
        background: #1d4ed8;
    }
}

/* Variantes de colonnes */
.cdfef-calendar-container[data-columns="2"] .cdfef-calendar-grid {
    grid-template-columns: repeat(auto-fill, minmax(450px, 1fr));
}

.cdfef-calendar-container[data-columns="4"] .cdfef-calendar-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

@media (max-width: 768px) {
    .cdfef-calendar-container[data-columns="2"] .cdfef-calendar-grid,
    .cdfef-calendar-container[data-columns="4"] .cdfef-calendar-grid {
        grid-template-columns: 1fr;
    }
}