/**
 * Crowdaa Advent Calendar - User Profile CSS
 *
 * Mobile-first, Framework7/Cordova style
 * Professional, clean, maintainable
 *
 * @version 3.10.9
 * @author Crowdaa
 */

/* ================================================================
   1. CSS VARIABLES (Design Tokens)
   ================================================================ */

:root {
    /* Colors - Primary */
    --profile-primary: var(--cal-primary, #dd3333) /* v3.9.5 */;
    --profile-primary-dark: #b32828;
    --profile-primary-light: #f77171;

    /* Colors - Status */
    --profile-success: #10b981;
    --profile-warning: #f59e0b;
    --profile-danger: #ef4444;
    --profile-info: #3b82f6;

    /* Colors - Neutral */
    --profile-bg: #f5f5f5;
    --profile-card-bg: #ffffff;
    --profile-text: #333333;
    --profile-text-light: #666666;
    --profile-text-muted: #999999;
    --profile-border: #e5e5e5;

    /* Colors - Gradients */
    --profile-gradient-primary: linear-gradient(135deg, var(--profile-primary) 0%, var(--profile-primary-light) 100%);
    --profile-gradient-success: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --profile-gradient-warning: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    --profile-gradient-streak: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);

    /* Spacing */
    --profile-spacing-xs: 8px;
    --profile-spacing-sm: 12px;
    --profile-spacing-md: 16px;
    --profile-spacing-lg: 24px;
    --profile-spacing-xl: 32px;

    /* Typography */
    --profile-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --profile-font-size-xs: 11px;
    --profile-font-size-sm: 13px;
    --profile-font-size-base: 14px;
    --profile-font-size-lg: 16px;
    --profile-font-size-xl: 18px;
    --profile-font-size-2xl: 24px;
    --profile-font-size-3xl: 32px;

    /* Border Radius */
    --profile-radius-sm: 8px;
    --profile-radius-md: 12px;
    --profile-radius-lg: 16px;
    --profile-radius-full: 50%;

    /* Shadows */
    --profile-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --profile-shadow-md: 0 2px 10px rgba(0, 0, 0, 0.1);
    --profile-shadow-lg: 0 8px 25px rgba(0, 0, 0, 0.15);
    --profile-shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.3);

    /* Transitions */
    --profile-transition-fast: 0.15s ease;
    --profile-transition-base: 0.3s ease;
    --profile-transition-slow: 0.5s ease;

    /* Z-index */
    --profile-z-modal: 10000;
    --profile-z-overlay: 9999;
    --profile-z-header: 100;
}

/* ================================================================
   2. RESET & BASE
   ================================================================ */

.crowdaa-user-profile {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--profile-spacing-md);
    font-family: var(--profile-font-family);
    font-size: var(--profile-font-size-base);
    color: var(--profile-text);
    background: var(--profile-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.crowdaa-user-profile * {
    box-sizing: border-box;
}

/* ================================================================
   3. LAYOUT - Header
   ================================================================ */

.crowdaa-profile-header {
    background: var(--profile-gradient-primary);
    color: white;
    padding: var(--profile-spacing-xl);
    border-radius: var(--profile-radius-md);
    margin-bottom: var(--profile-spacing-lg);
    text-align: center;
    box-shadow: var(--profile-shadow-md);
}

.crowdaa-profile-header h1 {
    margin: 0 0 var(--profile-spacing-sm) 0;
    font-size: var(--profile-font-size-3xl);
    font-weight: 700;
    line-height: 1.2;
}

.crowdaa-profile-header .user-name {
    font-size: var(--profile-font-size-xl);
    opacity: 0.95;
    font-weight: 500;
}

/* Share Button */
.crowdaa-share-button {
    margin-top: var(--profile-spacing-lg);
    padding: var(--profile-spacing-sm) var(--profile-spacing-xl);
    background: white;
    color: var(--profile-primary);
    border: 2px solid white;
    border-radius: var(--profile-radius-sm);
    font-weight: 600;
    font-size: var(--profile-font-size-lg);
    cursor: pointer;
    transition: all var(--profile-transition-base);
    box-shadow: var(--profile-shadow-md);
}

.crowdaa-share-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--profile-shadow-lg);
}

.crowdaa-share-button:active {
    transform: translateY(0);
}

/* ================================================================
   4. LAYOUT - Stats Grid
   ================================================================ */

.crowdaa-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--profile-spacing-sm);
    margin-bottom: var(--profile-spacing-lg);
}

.crowdaa-stat-card {
    background: var(--profile-card-bg);
    padding: var(--profile-spacing-md);
    border-radius: var(--profile-radius-md);
    box-shadow: var(--profile-shadow-sm);
    text-align: center;
    transition: all var(--profile-transition-base);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.crowdaa-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--profile-shadow-md);
}

.crowdaa-stat-card .icon {
    font-size: 32px;
    margin-bottom: var(--profile-spacing-xs);
    line-height: 1;
}

.crowdaa-stat-card .value {
    font-size: var(--profile-font-size-2xl);
    font-weight: 700;
    color: var(--profile-primary);
    margin: var(--profile-spacing-xs) 0;
    line-height: 1.2;
}

.crowdaa-stat-card .label {
    font-size: var(--profile-font-size-xs);
    color: var(--profile-text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    line-height: 1.3;
}

/* Progress Bar */
.crowdaa-progress-bar {
    width: 100%;
    background: #e9ecef;
    border-radius: 10px;
    height: 18px;
    overflow: hidden;
    margin-top: var(--profile-spacing-xs);
}

.crowdaa-progress-fill {
    background: var(--profile-gradient-primary);
    height: 100%;
    transition: width var(--profile-transition-slow);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: var(--profile-font-size-xs);
    font-weight: 700;
}

/* ================================================================
   5. COMPONENTS - Section
   ================================================================ */

.crowdaa-section {
    background: var(--profile-card-bg);
    padding: var(--profile-spacing-lg);
    border-radius: var(--profile-radius-md);
    box-shadow: var(--profile-shadow-sm);
    margin-bottom: var(--profile-spacing-lg);
}

.crowdaa-section h2 {
    margin: 0 0 var(--profile-spacing-md) 0;
    font-size: var(--profile-font-size-2xl);
    font-weight: 700;
    color: var(--profile-text);
    border-bottom: 3px solid var(--profile-primary);
    padding-bottom: var(--profile-spacing-sm);
    display: inline-block;
}

/* Section Header with Toggle */
.crowdaa-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--profile-spacing-md);
    flex-wrap: wrap;
    gap: var(--profile-spacing-sm);
}

.crowdaa-section-header h2 {
    margin: 0;
    flex: 1;
    min-width: 200px;
}

/* ================================================================
   6. COMPONENTS - Badges
   ================================================================ */

.crowdaa-badges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: var(--profile-spacing-md);
    margin-top: var(--profile-spacing-md);
}

.crowdaa-badge-card {
    background: var(--profile-card-bg);
    padding: var(--profile-spacing-lg);
    border-radius: var(--profile-radius-md);
    box-shadow: var(--profile-shadow-sm);
    text-align: center;
    transition: all var(--profile-transition-base);
    position: relative;
    overflow: hidden;
}

.crowdaa-badge-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: var(--badge-color, var(--profile-primary));
}

.crowdaa-badge-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--profile-shadow-lg);
}

.crowdaa-badge-icon {
    font-size: 36px;
    margin-bottom: var(--profile-spacing-sm);
    display: block;
    animation: badge-float 3s ease-in-out infinite;
}

@keyframes badge-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.crowdaa-badge-name {
    font-size: var(--profile-font-size-lg);
    font-weight: 700;
    color: var(--profile-text);
    margin: var(--profile-spacing-sm) 0 var(--profile-spacing-xs) 0;
}

.crowdaa-badge-description {
    font-size: var(--profile-font-size-sm);
    color: var(--profile-text-light);
    line-height: 1.5;
}

.crowdaa-badge-special {
    animation: badge-shine 2s ease-in-out infinite;
}

@keyframes badge-shine {
    0%, 100% { box-shadow: var(--profile-shadow-sm); }
    50% { box-shadow: 0 8px 30px rgba(255, 215, 0, 0.5); }
}

/* ================================================================
   7. COMPONENTS - Calendar Grid
   ================================================================ */

.crowdaa-calendar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: var(--profile-spacing-sm);
    margin-top: var(--profile-spacing-md);
}

.crowdaa-day-cell {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: var(--profile-radius-md);
    cursor: pointer;
    transition: all var(--profile-transition-base);
    position: relative;
    font-weight: 600;
    color: white;
    box-shadow: var(--profile-shadow-sm);
}

.crowdaa-day-cell:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: var(--profile-shadow-lg);
}

.crowdaa-day-cell:active {
    transform: translateY(0) scale(0.98);
}

/* Status Colors */
.crowdaa-day-cell.completed {
    background: var(--profile-gradient-success);
}

.crowdaa-day-cell.completed_late {
    background: var(--profile-gradient-warning);
}

.crowdaa-day-cell.pending {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.crowdaa-day-cell.rejected,
.crowdaa-day-cell.missed {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.crowdaa-day-cell.available {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.crowdaa-day-number {
    font-size: var(--profile-font-size-2xl);
    font-weight: 700;
    margin-bottom: 4px;
    line-height: 1;
}

.crowdaa-day-icon {
    font-size: var(--profile-font-size-lg);
    line-height: 1;
}

.crowdaa-day-points {
    font-size: var(--profile-font-size-xs);
    font-weight: 600;
    margin-top: 4px;
    opacity: 0.95;
}

.crowdaa-day-penalty {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 6px;
    font-weight: 700;
}

/* ================================================================
   8. COMPONENTS - Toggle Button
   ================================================================ */

.crowdaa-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--profile-spacing-xs);
    background: var(--profile-gradient-primary);
    color: white;
    border: none;
    padding: var(--profile-spacing-sm) var(--profile-spacing-lg);
    border-radius: var(--profile-radius-sm);
    font-size: var(--profile-font-size-base);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--profile-transition-base);
    box-shadow: var(--profile-shadow-sm);
}

.crowdaa-toggle-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--profile-shadow-md);
}

.crowdaa-toggle-btn:active {
    transform: translateY(0);
}

.crowdaa-toggle-btn .toggle-icon {
    transition: transform var(--profile-transition-base);
    font-size: var(--profile-font-size-sm);
}

.crowdaa-toggle-btn.expanded .toggle-icon {
    transform: rotate(180deg);
}

/* ================================================================
   9. COMPONENTS - Activity List
   ================================================================ */

.crowdaa-history-content {
    transition: all var(--profile-transition-base);
    overflow: hidden;
}

.crowdaa-activity-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.crowdaa-activity-item {
    display: flex;
    align-items: center;
    padding: var(--profile-spacing-md);
    border-bottom: 1px solid var(--profile-border);
    transition: background var(--profile-transition-fast);
    gap: var(--profile-spacing-md);
}

.crowdaa-activity-item:hover {
    background: #f8f9fa;
}

.crowdaa-activity-item:last-child {
    border-bottom: none;
}

.crowdaa-activity-icon {
    font-size: var(--profile-font-size-2xl);
    flex-shrink: 0;
    width: 40px;
    text-align: center;
}

.crowdaa-activity-info {
    flex: 1;
    min-width: 0;
}

.crowdaa-activity-title {
    font-weight: 600;
    color: var(--profile-text);
    margin-bottom: 4px;
}

.crowdaa-activity-date {
    font-size: var(--profile-font-size-sm);
    color: var(--profile-text-muted);
}

.crowdaa-activity-points {
    font-weight: 700;
    color: var(--profile-primary);
    font-size: var(--profile-font-size-xl);
    flex-shrink: 0;
}

.crowdaa-activity-points.rejected {
    color: var(--profile-danger);
}

/* Rejection Notice */
.crowdaa-rejection-notice {
    background: #fef2f2;
    border-left: 4px solid var(--profile-danger);
    padding: var(--profile-spacing-sm) var(--profile-spacing-md);
    margin-top: var(--profile-spacing-sm);
    border-radius: 4px;
}

.crowdaa-rejection-notice strong {
    color: var(--profile-danger);
    display: block;
    margin-bottom: 4px;
    font-weight: 600;
}

.crowdaa-rejection-notice p {
    margin: 0;
    color: #991b1b;
    font-size: var(--profile-font-size-sm);
    line-height: 1.5;
}

/* Empty State */
.crowdaa-empty-state {
    text-align: center;
    padding: var(--profile-spacing-xl) var(--profile-spacing-lg);
    color: var(--profile-text-muted);
}

.crowdaa-empty-state .icon {
    font-size: 48px;
    margin-bottom: var(--profile-spacing-md);
    opacity: 0.5;
}

/* ================================================================
   10. RESPONSIVE - Mobile First
   ================================================================ */

/* Tablet & Up (768px+) */
@media (min-width: 768px) {
    .crowdaa-user-profile {
        padding: var(--profile-spacing-lg);
    }

    .crowdaa-profile-header {
        padding: 40px;
    }

    .crowdaa-profile-header h1 {
        font-size: 36px;
    }

    .crowdaa-stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: var(--profile-spacing-lg);
    }

    .crowdaa-stat-card {
        padding: var(--profile-spacing-lg);
    }

    .crowdaa-stat-card .icon {
        font-size: 40px;
    }

    .crowdaa-stat-card .value {
        font-size: 36px;
    }

    .crowdaa-stat-card .label {
        font-size: var(--profile-font-size-sm);
    }

    .crowdaa-calendar-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: var(--profile-spacing-md);
    }

    .crowdaa-day-number {
        font-size: 28px;
    }

    .crowdaa-day-icon {
        font-size: 20px;
    }

    .crowdaa-badges-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }

    .crowdaa-section {
        padding: var(--profile-spacing-xl);
    }
}

/* Desktop & Up (1024px+) */
@media (min-width: 1024px) {
    .crowdaa-stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ================================================================
   11. ANIMATIONS & TRANSITIONS
   ================================================================ */

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Loading state */
.crowdaa-loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Focus states for accessibility */
.crowdaa-toggle-btn:focus,
.crowdaa-day-cell:focus,
.crowdaa-share-button:focus {
    outline: 2px solid var(--profile-primary);
    outline-offset: 2px;
}

/* ================================================================
   12. UTILITIES
   ================================================================ */

/* Text utilities */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* Spacing utilities */
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-sm { margin-top: var(--profile-spacing-sm); }
.mb-sm { margin-bottom: var(--profile-spacing-sm); }

/* Visibility */
.hidden { display: none; }
.visible { display: block; }

/* ================================================================
   13. MODAL CATCHUP (v3.11.0)
   ================================================================ */

/* Modal container */
.crowdaa-catchup-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
}

.crowdaa-catchup-modal .catchup-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    pointer-events: none; /* v3.30.38 - Ne bloque pas les clics sur le contenu */
}

.crowdaa-catchup-modal .catchup-modal-content {
    position: relative;
    background: white;
    max-width: 800px;
    margin: 50px auto;
    border-radius: 20px;
    max-height: 90vh;
    overflow-y: visible;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    -webkit-overflow-scrolling: touch;
    display: flex;
    flex-direction: column;
    z-index: 1; /* v3.30.37 - S'assurer que le contenu est au-dessus de l'overlay */
}

.crowdaa-catchup-modal .catchup-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 30px;
    cursor: pointer;
    color: #999;
    z-index: 1;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all var(--profile-transition-base);
}

.crowdaa-catchup-modal .catchup-modal-close:hover {
    background: #f0f0f0;
    color: #333;
}

.crowdaa-catchup-modal .catchup-modal-body {
    padding: 40px;
    overflow-y: auto;
    flex: 1;
    -webkit-overflow-scrolling: touch;
}

.crowdaa-catchup-modal .loading-spinner {
    text-align: center;
    padding: 60px 20px;
}

.crowdaa-catchup-modal .spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--profile-primary);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

.crowdaa-catchup-modal .loading-spinner p {
    margin-top: 20px;
    color: #666;
}

/* Day content styles */
.crowdaa-catchup-modal .day-number-square {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--cal-primary) 0%, var(--cal-secondary) 100%);
    color: white;
    border-radius: 12px;
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 20px;
    box-shadow: 0 6px 20px rgba(79, 91, 213, 0.4);
}

.crowdaa-catchup-modal .content-type-badge {
    display: inline-block;
    padding: 6px 12px;
    background: var(--crowdaa-light-blue);
    color: var(--cal-primary);
    font-size: 12px;
    font-weight: 600;
    border-radius: 20px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.crowdaa-catchup-modal .day-header {
    text-align: center;
    margin-bottom: 30px;
}

.crowdaa-catchup-modal .day-points {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    padding: 6px 16px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    display: inline-block;
    margin-bottom: 10px;
}

/* Fix pour dropdowns Choices.js dans modal catchup */
.crowdaa-catchup-modal .choices__list--dropdown {
    z-index: 10 !important;
    position: absolute !important;
}

.crowdaa-catchup-modal .choices[data-type*="select-one"] .choices__list--dropdown,
.crowdaa-catchup-modal .choices[data-type*="select-multiple"] .choices__list--dropdown {
    z-index: 10 !important;
    position: absolute !important;
}

@media (max-width: 768px) {
    .crowdaa-catchup-modal .day-number-square {
        width: 60px;
        height: 60px;
        font-size: 32px;
    }
}

/* Mobile/Webview fullscreen slide animation */
.crowdaa-catchup-modal.mobile-fullscreen {
    background: rgba(0, 0, 0, 0.5);
}

.crowdaa-catchup-modal.mobile-fullscreen .catchup-modal-overlay {
    display: none;
}

.crowdaa-catchup-modal.mobile-fullscreen .catchup-modal-content {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: auto;
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    margin: 0;
    border-radius: 0;
    transform: translate3d(100%, 0, 0);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
    backface-visibility: hidden;
}

.crowdaa-catchup-modal.mobile-fullscreen.active .catchup-modal-content {
    transform: translate3d(0, 0, 0);
}

.crowdaa-catchup-modal.mobile-fullscreen.closing .catchup-modal-content {
    transform: translate3d(100%, 0, 0);
}

@media (max-width: 768px) {
    .crowdaa-catchup-modal .catchup-modal-content {
        margin: 20px;
        max-height: calc(100vh - 40px);
    }

    .crowdaa-catchup-modal .catchup-modal-body {
        padding: 30px 20px;
    }
}

@media (max-width: 480px) {
    .crowdaa-catchup-modal .catchup-modal-body {
        padding: 20px 15px;
    }
}

/* ================================================================
   14. ADDITIONAL COMPONENTS (v3.11.2)
   ================================================================ */

/* Share button wrapper */
.crowdaa-share-button-wrapper {
    margin-top: 20px;
}

.crowdaa-share-button {
    padding: 12px 30px;
    background: white;
    color: var(--profile-primary);
    border: 2px solid white;
    border-radius: var(--profile-radius-sm);
    font-weight: bold;
    cursor: pointer;
    transition: all var(--profile-transition-base);
    font-size: 16px;
}

.crowdaa-share-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
}

/* Streak card (yellow gradient) */
.crowdaa-streak-card {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
}

.crowdaa-streak-card .value {
    color: #d97706;
}

.crowdaa-streak-card .label {
    color: #92400e;
}

.streak-bonus {
    font-size: 12px;
    margin-top: 10px;
    color: #92400e;
    font-weight: 600;
}

.streak-next {
    font-size: 11px;
    margin-top: 5px;
    color: #78350f;
    opacity: 0.8;
}

/* Likes card */
.crowdaa-likes-card {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
}

.crowdaa-likes-card .value {
    color: #d97706;
}

.crowdaa-likes-card .label {
    color: #92400e;
}

.likes-points {
    font-size: 12px;
    margin-top: 10px;
    color: #92400e;
}

/* Calendar legend */
.crowdaa-calendar-legend {
    margin-top: 30px;
    padding: 20px;
    background: #f9fafb;
    border-radius: var(--profile-radius-md);
}

.crowdaa-calendar-legend h3 {
    margin: 0 0 15px 0;
    font-size: 14px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.legend-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    font-size: 13px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-item .icon-completed { color: #10b981; font-size: 18px; }
.legend-item .icon-late { color: #f59e0b; font-size: 18px; }
.legend-item .icon-pending { color: #3b82f6; font-size: 18px; }
.legend-item .icon-rejected { color: #ef4444; font-size: 18px; }
.legend-item .icon-missed { color: #ef4444; font-size: 18px; }
.legend-item .icon-available { color: #8b5cf6; font-size: 18px; }

/* Section header (history toggle) */
.crowdaa-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.crowdaa-section-header h2 {
    margin: 0;
}

/* Hidden by default (toggle) */
.crowdaa-history-content {
    display: none;
}

/* Activity likes */
.activity-likes {
    margin-left: 10px;
    color: #e91e63;
}

/* Pending notice (yellow) */
.crowdaa-pending-notice {
    background: #fffbeb;
    border-left-color: #f59e0b;
}

.crowdaa-pending-notice strong {
    color: #f59e0b;
}

.crowdaa-pending-notice p {
    color: #92400e;
}

/* Modal base styles - v3.30.2 Fix */
.crowdaa-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
}

.crowdaa-modal.show,
.crowdaa-modal[style*="display: block"],
.crowdaa-modal[style*="display:block"] {
    display: block !important;
}

.crowdaa-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Mobile-first: Bottom sheet */
.crowdaa-modal-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-radius: 24px 24px 0 0;
    padding: 0;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    z-index: 1;
    animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

/* Desktop: Modal centré */
@media (min-width: 768px) {
    .crowdaa-modal {
        display: none;
        align-items: center;
        justify-content: center;
    }

    .crowdaa-modal.show,
    .crowdaa-modal[style*="display: block"],
    .crowdaa-modal[style*="display:block"] {
        display: flex !important;
    }

    .crowdaa-modal-content {
        position: relative;
        bottom: auto;
        left: auto;
        right: auto;
        border-radius: 16px;
        padding: 0;
        max-width: 800px;
        width: 90%;
        max-height: 85vh;
        animation: scaleIn 0.2s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    }

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

.crowdaa-modal-close {
    position: absolute;
    right: 20px;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: #6b7280;
    transition: all 0.2s ease;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    font-size: 28px;
    line-height: 1;
    z-index: 10;
}

.crowdaa-modal-close:hover {
    background: #f3f4f6;
    color: #1f2937;
}

@media (min-width: 768px) {
    .crowdaa-modal-close {
        width: 40px;
        height: 40px;
        font-size: 32px;
    }
}

/* Share modal */
.crowdaa-share-modal .crowdaa-modal-content {
    max-width: 800px;
}

.crowdaa-share-modal .crowdaa-modal-content h3 {
    margin: 0;
    padding: 20px 24px;
    text-align: center;
    color: #1f2937;
    font-size: 18px;
    font-weight: 600;
    border-bottom: 1px solid #e5e7eb;
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .crowdaa-share-modal .crowdaa-modal-content h3 {
        font-size: 20px;
        padding: 24px 30px;
    }
}

.share-preview {
    text-align: center;
    padding: 20px 24px;
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .share-preview {
        padding: 24px 30px;
    }
}

.share-preview .crowdaa-loader {
    display: none;
}

.share-image {
    max-width: 100%;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: none;
}

.share-platforms {
    display: none;
}

#crowdaa-share-platforms {
    padding: 20px 24px 24px;
    flex: 1;
    overflow-y: auto;
}

@media (min-width: 768px) {
    #crowdaa-share-platforms {
        padding: 24px 30px 30px;
    }
}

.share-platforms-title {
    text-align: center;
    color: #6b7280;
    margin-bottom: 20px;
    font-weight: 600;
    font-size: 14px;
    display: none;
}

@media (min-width: 768px) {
    .share-platforms-title {
        font-size: 16px;
        display: block;
    }
}

/* Grid des boutons de partage - Mobile: Icônes rondes */
.crowdaa-share-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    padding: 0;
}

@media (min-width: 768px) {
    .crowdaa-share-grid {
        display: grid;
        grid-template-columns: repeat(6, 1fr);
        gap: 15px;
    }
}

/* Bouton de plateforme sociale - Mobile: Cercle avec icône uniquement */
.crowdaa-share-platform {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 11px;
    font-weight: 500;
    color: #6b7280;
    text-align: center;
}

@media (min-width: 768px) {
    .crowdaa-share-platform {
        gap: 8px;
        padding: 15px 10px;
        background: white;
        border: 2px solid #e5e7eb;
        border-radius: 12px;
        font-size: 13px;
        color: #333;
        min-height: 90px;
    }
}

/* Mobile: Effet de scale au tap */
.crowdaa-share-platform:active .platform-icon {
    transform: scale(0.9);
}

/* Desktop: Hover effects */
@media (min-width: 768px) {
    .crowdaa-share-platform:hover {
        transform: translateY(-3px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        border-color: #d1d5db;
    }

    .crowdaa-share-platform:active {
        transform: scale(0.95);
        opacity: 0.9;
    }
}

/* Cercle contenant l'icône - Mobile */
.platform-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .platform-icon {
        width: auto;
        height: auto;
        border-radius: 0;
        background: transparent !important;
    }
}

.platform-icon svg {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .platform-icon svg {
        width: 40px;
        height: 40px;
    }
}

/* Labels des plateformes */
.crowdaa-share-platform span {
    display: block;
    max-width: 70px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (min-width: 768px) {
    .crowdaa-share-platform span {
        max-width: 100%;
        width: 100%;
    }
}

/* Couleurs des cercles d'icônes - Mobile */
.crowdaa-share-platform[data-platform="linkedin"] .platform-icon {
    background: linear-gradient(135deg, #0077b5 0%, #005582 100%);
}

.crowdaa-share-platform[data-platform="facebook"] .platform-icon {
    background: linear-gradient(135deg, #1877f2 0%, #0d5dbf 100%);
}

.crowdaa-share-platform[data-platform="whatsapp"] .platform-icon {
    background: linear-gradient(135deg, #25d366 0%, #1da851 100%);
}

.crowdaa-share-platform[data-platform="twitter"] .platform-icon {
    background: linear-gradient(135deg, #1da1f2 0%, #1480c9 100%);
}

.crowdaa-share-platform[data-platform="instagram"] .platform-icon {
    background: linear-gradient(135deg, #e1306c 0%, #bc1888 50%, #833ab4 100%);
}

.crowdaa-share-platform[data-platform="download"] .platform-icon {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
}

/* Les SVG doivent être blancs sur mobile */
.platform-icon svg path {
    fill: white;
}

@media (min-width: 768px) {
    .platform-icon svg path {
        fill: initial;
    }
}

/* Couleurs spécifiques par plateforme au hover - Desktop */
@media (min-width: 768px) {
    .crowdaa-share-platform[data-platform="linkedin"]:hover {
        border-color: #0077b5;
        background: #f0f8ff;
    }

    .crowdaa-share-platform[data-platform="facebook"]:hover {
        border-color: #1877f2;
        background: #f0f5ff;
    }

    .crowdaa-share-platform[data-platform="whatsapp"]:hover {
        border-color: #25d366;
        background: #f0fdf4;
    }

    .crowdaa-share-platform[data-platform="twitter"]:hover {
        border-color: #1da1f2;
        background: #f0f9ff;
    }

    .crowdaa-share-platform[data-platform="instagram"]:hover {
        border-color: #e1306c;
        background: #fef2f2;
    }

    .crowdaa-share-platform[data-platform="download"]:hover {
        border-color: #666;
        background: #f9fafb;
    }
}

/* ================================================================
   v3.10.1 - SECTION CONCLUSION
   ================================================================ */

.crowdaa-conclusion-section {
    margin-top: 30px;
}

.crowdaa-conclusion-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 30px;
    display: flex;
    align-items: center;
    gap: 25px;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.crowdaa-conclusion-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.crowdaa-conclusion-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.4);
}

.crowdaa-conclusion-card.completed {
    background: linear-gradient(135deg, #7ED957 0%, #5cb85c 100%);
    box-shadow: 0 10px 30px rgba(126, 217, 87, 0.3);
}

.conclusion-card-icon {
    font-size: 60px;
    flex-shrink: 0;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.conclusion-card-content {
    flex: 1;
    color: white;
}

.conclusion-card-content h3 {
    margin: 0 0 10px 0;
    font-size: 22px;
    font-weight: 700;
    color: white;
}

.conclusion-card-content p {
    margin: 0;
    font-size: 16px;
    opacity: 0.95;
}

.crowdaa-btn-conclusion {
    background: white;
    color: #667eea;
    padding: 14px 30px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
    display: inline-block;
}

.crowdaa-btn-conclusion:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    color: #667eea;
    text-decoration: none;
}

.crowdaa-conclusion-card.completed .crowdaa-btn-conclusion {
    background: rgba(255, 255, 255, 0.3);
    color: white;
    border: 2px solid white;
}

@media (max-width: 768px) {
    .crowdaa-conclusion-card {
        flex-direction: column;
        text-align: center;
        padding: 25px 20px;
        gap: 20px;
    }

    .conclusion-card-icon {
        font-size: 50px;
    }

    .conclusion-card-content h3 {
        font-size: 20px;
    }

    .conclusion-card-content p {
        font-size: 15px;
    }

    .crowdaa-btn-conclusion {
        width: 100%;
        padding: 12px 24px;
    }
}

@media (max-width: 768px) {
    .crowdaa-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .crowdaa-toggle-btn {
        width: 100%;
        justify-content: center;
    }
}
