/* Reset et styles de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 1.9rem;
    margin-bottom: 0.2rem;
}

.logo p {
    font-size: 0.9rem;
    opacity: 0.9;
}

.nav {
    display: flex;
    gap: 1rem;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link:hover,
.nav-link.active {
    background-color: rgba(255,255,255,0.2);
}

/* Main content */
.main {
    padding: 2rem 0;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 350px;
    grid-template-rows: auto auto;
    gap: 2rem;
    margin-bottom: 2rem;
}

.chart-section {
    grid-column: 1;
    grid-row: 1 / 3;
    min-height: 600px;
    display: flex;
    flex-direction: column;
}

.calendar-section {
    grid-column: 2;
    grid-row: 1;
}

.publications-section {
    grid-column: 1 / 3;
    grid-row: 3;
}

.announcements-section {
    grid-column: 1 / 3;
    grid-row: 4;
}

/* Sections */
section {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.section-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f1f3f4;
}

.section-header h2 {
    color: #333;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-header p {
    color: #666;
    font-size: 0.9rem;
}


/* Statisticians Header */
.statisticians-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    color: white;
}

.stats-summary {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.total-members {
    text-align: center;
    padding: 1rem;
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    min-width: 120px;
}

.total-members .count {
    display: block;
    font-size: 2.5rem;
    font-weight: bold;
    line-height: 1;
}

.total-members .label {
    font-size: 0.9rem;
    opacity: 0.9;
}

.level-stats {
    display: flex;
    gap: 1rem;
}

.level-stat {
    text-align: center;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    min-width: 100px;
}

.level-stat.level-1 { background: rgba(76, 175, 80, 0.3); }
.level-stat.level-2 { background: rgba(255, 152, 0, 0.3); }
.level-stat.level-3 { background: rgba(244, 67, 54, 0.3); }

.level-stat .count {
    display: block;
    font-size: 1.8rem;
    font-weight: bold;
    line-height: 1;
}

.level-stat .label {
    font-size: 0.8rem;
    opacity: 0.9;
}

.filter-controls {
    display: flex;
    gap: 0.5rem;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border: 2px solid rgba(255,255,255,0.3);
    background: transparent;
    color: white;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.filter-btn:hover,
.filter-btn.active {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.6);
}

/* Statisticians Grid */
.statisticians-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.statistician-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.statistician-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.statistician-card.level-1 {
    border-left: 5px solid #4CAF50;
}

.statistician-card.level-2 {
    border-left: 5px solid #FF9800;
}

.statistician-card.level-3 {
    border-left: 5px solid #F44336;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.card-photo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #f0f0f0;
    transition: all 0.3s ease;
}

.statistician-card.level-1 .card-photo {
    border-color: #4CAF50;
}

.statistician-card.level-2 .card-photo {
    border-color: #FF9800;
}

.statistician-card.level-3 .card-photo {
    border-color: #F44336;
}

.card-info h3 {
    margin: 0 0 0.5rem 0;
    color: #333;
    font-size: 1.2rem;
}

.card-level {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: bold;
    color: white;
}

.card-level.level-1 { background-color: #4CAF50; }
.card-level.level-2 { background-color: #FF9800; }
.card-level.level-3 { background-color: #F44336; }

.card-gender {
    color: #666;
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

.card-description {
    color: #555;
    line-height: 1.5;
    font-size: 0.95rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-footer {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.view-profile-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.view-profile-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

/* Responsive pour les cartes */
@media (max-width: 768px) {
    .statisticians-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .stats-summary {
        flex-direction: column;
        gap: 1rem;
    }
    
    .level-stats {
        justify-content: center;
    }
    
    .statisticians-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
    }
}

/* Calendar/* Calendar */
.calendar {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.calendar-header {
    background: #667eea;
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.calendar-nav {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 3px;
    transition: background-color 0.3s ease;
}

.calendar-nav:hover {
    background-color: rgba(255,255,255,0.2);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background-color: #e0e0e0;
}

.calendar-day {
    background: white;
    padding: 0.5rem;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-day:hover {
    background-color: #f5f5f5;
}

.calendar-day.has-event {
    background-color: #e3f2fd;
    color: #1976d2;
    font-weight: bold;
}

.events-list {
    max-height: 200px;
    overflow-y: auto;
}

.event-item {
    padding: 0.75rem;
    border-left: 4px solid #667eea;
    background: #f8f9fa;
    margin-bottom: 0.5rem;
    border-radius: 0 5px 5px 0;
}

.event-title {
    font-weight: bold;
    margin-bottom: 0.25rem;
}

.event-details {
    font-size: 0.85rem;
    color: #666;
}

/* Publications et Annonces */
.publications-container,
.announcements-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.publication-card,
.announcement-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.publication-card:hover,
.announcement-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.card-title {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: #333;
}

.card-author {
    color: #667eea;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.card-description {
    color: #666;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #667eea;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}

.card-link:hover {
    text-decoration: underline;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    position: relative;
    animation: slideIn 0.3s ease;
}

.close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    color: #999;
    transition: color 0.3s ease;
}

.close:hover {
    color: #333;
}

.profile-details {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.modal-photo {
    width: 150px;
    height: 150px;
    border-radius: 10px;
    object-fit: cover;
}

.profile-info h3 {
    margin-bottom: 0.5rem;
    color: #333;
}

.profile-level {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.profile-level.level-1 { background-color: #4CAF50; color: white; }
.profile-level.level-2 { background-color: #FF9800; color: white; }
.profile-level.level-3 { background-color: #F44336; color: white; }

.profile-gender {
    color: #666;
    margin-bottom: 1rem;
}

.profile-description {
    line-height: 1.6;
    color: #333;
}

/* Admin Layout */
.admin-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
    min-height: 80vh;
}

.admin-sidebar {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    height: fit-content;
}

.admin-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.admin-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: #666;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.admin-nav-link:hover,
.admin-nav-link.active {
    background-color: #667eea;
    color: white;
}

.admin-content {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* Forms */
.form-container {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e0e0e0;
}

.btn-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.btn-close:hover {
    background-color: #f5f5f5;
    color: #333;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.form-help {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.85rem;
    color: #666;
}

.photo-preview {
    margin-top: 0.5rem;
}

.preview-image {
    max-width: 150px;
    max-height: 150px;
    border-radius: 5px;
    object-fit: cover;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: #667eea;
    color: white;
}

.btn-primary:hover {
    background-color: #5a6fd8;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
}

.btn-sm {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.table th,
.table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.table-photo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.no-photo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
}

.level-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: bold;
}

.level-badge.level-1 { background-color: #4CAF50; color: white; }
.level-badge.level-2 { background-color: #FF9800; color: white; }
.level-badge.level-3 { background-color: #F44336; color: white; }

.description-cell {
    max-width: 200px;
}

.actions-cell {
    display: flex;
    gap: 0.5rem;
}

/* Empty states */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #666;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #ddd;
}

.empty-state h3 {
    margin-bottom: 0.5rem;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* Event status */
.event-status {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: bold;
    margin-left: 0.5rem;
}

.event-status.past {
    background-color: #f8d7da;
    color: #721c24;
}

.event-status.upcoming {
    background-color: #fff3cd;
    color: #856404;
}

/* Announcements grid */
.announcements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
}

.announcement-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.announcement-header h3 {
    margin: 0;
    color: #333;
}

.announcement-actions {
    display: flex;
    gap: 0.5rem;
}

.announcement-content {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.announcement-footer {
    border-top: 1px solid #e0e0e0;
    padding-top: 0.75rem;
}

/* Responsive */
@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }
    
    .chart-section,
    .calendar-section,
    .publications-section,
    .announcements-section {
        grid-column: 1;
        grid-row: auto;
    }
    
    .chart-container {
        flex-direction: column;
        text-align: center;
    }
    
    .admin-layout {
        grid-template-columns: 1fr;
    }
    
    .admin-sidebar {
        order: 2;
    }
    
    .admin-content {
        order: 1;
    }
    
    .profile-details {
        flex-direction: column;
        text-align: center;
    }
}

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

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Utilities */
.text-muted {
    color: #666 !important;
}

.link-btn {
    color: #667eea;
    text-decoration: none;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.link-btn:hover {
    text-decoration: underline;
}

/* Team CardView Styles */
.team-header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    color: white;
}

.team-intro h3 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.team-intro p {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 1.5rem;
}

.team-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
    padding: 0.5rem;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: bold;
    line-height: 1;
}

.stat-label {
    font-size: 0.8rem;
    opacity: 0.8;
    text-transform: uppercase;
}

.filter-tabs {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-tab {
    padding: 0.5rem 1rem;
    border: 2px solid #e9ecef;
    background: white;
    color: #6c757d;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.filter-tab:hover,
.filter-tab.active {
    background: #667eea;
    border-color: #667eea;
    color: white;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.team-member-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border-top: 4px solid #667eea;
}

.team-member-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.team-member-card.level-1 { border-top-color: #4CAF50; }
.team-member-card.level-2 { border-top-color: #FF9800; }
.team-member-card.level-3 { border-top-color: #F44336; }

.member-photo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 1rem;
    border: 3px solid #f0f0f0;
}

.team-member-card.level-1 .member-photo { border-color: #4CAF50; }
.team-member-card.level-2 .member-photo { border-color: #FF9800; }
.team-member-card.level-3 .member-photo { border-color: #F44336; }

.member-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.member-title {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.member-title.level-1 { background: rgba(76, 175, 80, 0.1); color: #4CAF50; }
.member-title.level-2 { background: rgba(255, 152, 0, 0.1); color: #FF9800; }
.member-title.level-3 { background: rgba(244, 67, 54, 0.1); color: #F44336; }

.member-gender {
    color: #999;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.member-description {
    color: #666;
    line-height: 1.4;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.member-actions {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.action-btn {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: 1px solid #ddd;
    background: white;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.action-btn:hover {
    background: #667eea;
    border-color: #667eea;
    color: white;
}

.view-profile-btn {
    background: #667eea;
    border-color: #667eea;
    color: white;
}

.loading-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem;
    color: #666;
    font-style: italic;
}

@media (max-width: 768px) {
    .team-stats { flex-direction: column; gap: 1rem; }
    .filter-tabs { flex-direction: column; align-items: center; }
    .team-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
}

/* Système de défilement horizontal par niveaux */
.stats-summary {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    min-width: 120px;
    border-top: 4px solid #667eea;
}

.stat-card.level-1 { border-top-color: #4CAF50; }
.stat-card.level-2 { border-top-color: #FF9800; }
.stat-card.level-3 { border-top-color: #F44336; }
.stat-card.total { border-top-color: #667eea; }

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-card.level-1 .stat-number { color: #4CAF50; }
.stat-card.level-2 .stat-number { color: #FF9800; }
.stat-card.level-3 .stat-number { color: #F44336; }
.stat-card.total .stat-number { color: #667eea; }

.stat-label {
    font-size: 0.9rem;
    color: #000;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.level-section {
    margin-bottom: 2rem;
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.level-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
}

.level-header h3 {
    margin: 0;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.level-header.level-1 h3 { color: #4CAF50; }
.level-header.level-2 h3 { color: #FF9800; }
.level-header.level-3 h3 { color: #F44336; }

.scroll-controls {
    display: flex;
    gap: 0.5rem;
}

.scroll-btn {
    width: 40px;
    height: 40px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: #666;
}

.scroll-btn:hover {
    border-color: #667eea;
    background: #667eea;
    color: white;
    transform: scale(1.1);
}

.photos-scroll {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding: 1rem 0;
    scroll-behavior: smooth;
}

.photos-scroll::-webkit-scrollbar {
    height: 8px;
}

.photos-scroll::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.photos-scroll::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.photos-scroll::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

.member-photo-card {
    flex-shrink: 0;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0.5rem;
    border-radius: 12px;
    background: #fafafa;
    min-width: 100px;
}

.member-photo-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    background: white;
}

.member-photo-small {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 0.5rem;
    border: 3px solid #f0f0f0;
    transition: all 0.3s ease;
}

.level-section.level-1 .member-photo-small {
    border-color: #4CAF50;
}

.level-section.level-2 .member-photo-small {
    border-color: #FF9800;
}

.level-section.level-3 .member-photo-small {
    border-color: #F44336;
}

.member-photo-card:hover .member-photo-small {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.member-name-small {
    font-size: 0.8rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.25rem;
    line-height: 1.2;
}

.member-level-badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    font-weight: 500;
    text-transform: uppercase;
}

.member-level-badge.level-1 {
    background: rgba(76, 175, 80, 0.1);
    color: #4CAF50;
}

.member-level-badge.level-2 {
    background: rgba(255, 152, 0, 0.1);
    color: #FF9800;
}

.member-level-badge.level-3 {
    background: rgba(244, 67, 54, 0.1);
    color: #F44336;
}

.loading-text {
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 2rem;
}

/* Responsive */
@media (max-width: 768px) {
    .stats-summary {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .level-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .member-photo-small {
        width: 50px;
        height: 50px;
    }
    
    .member-name-small {
        font-size: 0.75rem;
    }
}

/* Fix pour les images */
.member-photo-small {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.member-photo-card {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
}

.photos-scroll {
    display: flex !important;
    overflow-x: auto !important;
}

/* Animations pour les photos */
.animate-slide {
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.6s ease;
}

.member-photo-card {
    transition: all 0.3s ease;
}

.member-photo-card:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 12px 25px rgba(0,0,0,0.2);
}

.member-photo-small {
    transition: all 0.3s ease;
}

.member-photo-card:hover .member-photo-small {
    transform: scale(1.1);
}

/* Styles pour les sections */
.event-item, .publication-item, .announcement-item {
    background: white;
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.event-item:hover, .publication-item:hover, .announcement-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.priority-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
}

.priority-high { background: #ffebee; color: #c62828; }
.priority-medium { background: #fff3e0; color: #ef6c00; }
.priority-low { background: #e8f5e8; color: #2e7d32; }

.download-btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.download-btn:hover {
    background: #5a6fd8;
    transform: translateY(-1px);
}

.calendar-day.has-event {
    background: #667eea;
    color: white;
    font-weight: bold;
}

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





/* Hauteur augmentée pour plus d'espace */
    height: 700px; /* Plus de place pour toutes les photos */
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    overflow: visible !important; /* Changé à visible pour voir toutes les photos */
    margin: 2rem 0;
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
    padding: 2rem;
    z-index: 1;
    /* Assurer l'affichage de tous les éléments */
    display: block;
}

/* Photos dans le wordcloud - Visibilité garantie */
.cloud-photo {
    position: absolute;
    cursor: pointer;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 4px 15px rgba(0,0,0,0.12);
    border: 2px solid rgba(255,255,255,0.8);
    z-index: 10;
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
    /* Assurer que les photos ne sont jamais cachées */
    pointer-events: auto;
    transform: translateZ(0); /* Force hardware acceleration */
}

/* Hover sans débordement mais visible */
.cloud-photo:hover {
    transform: scale(1.08) translateZ(0) !important;
    z-index: 1000 !important;
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    border-color: #fff;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Tailles photos - Optimisées pour visibilité */
.cloud-photo.size-xl {
    width: 85px !important;
    height: 85px !important;
    z-index: 60;
}

.cloud-photo.size-lg {
    width: 75px !important;
    height: 75px !important;
    z-index: 50;
}

.cloud-photo.size-md {
    width: 65px !important;
    height: 65px !important;
    z-index: 30;
}

.cloud-photo.size-sm {
    width: 55px !important;
    height: 55px !important;
    z-index: 20;
}

.cloud-photo.size-xs {
    width: 45px !important;
    height: 45px !important;
    z-index: 15;
}

/* Experts - Toujours visibles */
.cloud-photo.level-1 {
    z-index: 100 !important;
    border-color: #4CAF50 !important;
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.3) !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.cloud-photo.level-2 {
    z-index: 50 !important;
    border-color: #FF9800 !important;
    box-shadow: 0 4px 15px rgba(255, 152, 0, 0.25) !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.cloud-photo.level-3 {
    z-index: 25 !important;
    border-color: #2196F3 !important;
    box-shadow: 0 3px 12px rgba(33, 150, 243, 0.2) !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Images dans les photos - Toujours visibles */
.cloud-photo img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    border-radius: 10px;
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
    background: #f0f0f0;
}

/* Badge niveau - Toujours au-dessus */
.cloud-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: bold;
    color: white;
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    z-index: 5;
    opacity: 1 !important;
    visibility: visible !important;
}

.cloud-badge.level-1 { 
    background: linear-gradient(45deg, #4CAF50, #45a049) !important;
    z-index: 105 !important;
}
.cloud-badge.level-2 { 
    background: linear-gradient(45deg, #FF9800, #f57c00) !important;
    z-index: 55 !important;
}
.cloud-badge.level-3 { 
    background: linear-gradient(45deg, #2196F3, #1976d2) !important;
    z-index: 30 !important;
}

/* Nom flottant - Visible au hover */
.cloud-name {
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.85);
    color: white;
    padding: 0.25rem 0.6rem;
    border-radius: 15px;
    font-size: 0.7rem;
    white-space: nowrap;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    backdrop-filter: blur(8px);
    z-index: 10;
}

.cloud-photo:hover .cloud-name {
    opacity: 1 !important;
    bottom: -28px;
    z-index: 1001 !important;
    visibility: visible !important;
}

/* Responsive - Hauteur ajustée pour visibilité */
@media (max-width: 1200px) {
    .organic-wordcloud {
        min-height: 650px;
        height: 650px;
        padding: 1.5rem;
    }
    
    .cloud-photo.size-xl { width: 80px !important; height: 80px !important; }
    .cloud-photo.size-lg { width: 70px !important; height: 70px !important; }
    .cloud-photo.size-md { width: 60px !important; height: 60px !important; }
    .cloud-photo.size-sm { width: 50px !important; height: 50px !important; }
    .cloud-photo.size-xs { width: 40px !important; height: 40px !important; }
}

@media (max-width: 768px) {
    .organic-wordcloud {
        min-height: 550px;
        height: 550px;
        padding: 1rem;
        border-radius: 12px;
    }
    
    .cloud-photo.size-xl { width: 70px !important; height: 70px !important; }
    .cloud-photo.size-lg { width: 60px !important; height: 60px !important; }
    .cloud-photo.size-md { width: 50px !important; height: 50px !important; }
    .cloud-photo.size-sm { width: 45px !important; height: 45px !important; }
    .cloud-photo.size-xs { width: 35px !important; height: 35px !important; }
}

@media (max-width: 480px) {
    .organic-wordcloud {
        min-height: 450px;
        height: 450px;
        margin: 1rem 0;
    }
    
    .cloud-photo.size-xl { width: 60px !important; height: 60px !important; }
    .cloud-photo.size-lg { width: 50px !important; height: 50px !important; }
    .cloud-photo.size-md { width: 45px !important; height: 45px !important; }
    .cloud-photo.size-sm { width: 40px !important; height: 40px !important; }
    .cloud-photo.size-xs { width: 30px !important; height: 30px !important; }
}

/* Loading state - Ajusté pour nouvelle hauteur */
.cloud-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.2rem;
    text-align: center;
    z-index: 1000;
}
/* FORCER le clipping */
    margin: 2rem 0;
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
    padding: 2rem;
    z-index: 1;
    /* Créer un contexte de confinement */
    contain: layout style paint;
}

/* Photos dans le wordcloud - Confinement strict */
.cloud-photo {
    position: absolute;
    cursor: pointer;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 4px 15px rgba(0,0,0,0.12);
    border: 2px solid rgba(255,255,255,0.8);
    z-index: 10;
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
    /* Contraintes de position strictes */
    max-width: 100px !important;
    max-height: 100px !important;
    /* Empêcher le débordement */
    contain: layout style paint size;
}

/* Contraintes de position pour éviter le débordement */
.cloud-photo {
    /* Limites minimales */
    min-left: 0px;
    min-top: 0px;
    /* Limites maximales calculées dynamiquement */
}

/* Hover avec contraintes */
.cloud-photo:hover {
    transform: scale(1.05) !important; /* Réduire le scale pour éviter débordement */
    z-index: 1000 !important;
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    border-color: #fff;
    /* Empêcher le débordement au hover */
    max-width: 100px !important;
    max-height: 100px !important;
}

/* Tailles photos - Strictement contrôlées */
.cloud-photo.size-xl {
    width: 90px !important;  /* Réduit de 100px */
    height: 90px !important;
    z-index: 60;
}

.cloud-photo.size-lg {
    width: 80px !important;  /* Réduit de 85px */
    height: 80px !important;
    z-index: 50;
}

.cloud-photo.size-md {
    width: 65px !important;  /* Réduit de 70px */
    height: 65px !important;
    z-index: 30;
}

.cloud-photo.size-sm {
    width: 50px !important;  /* Réduit de 55px */
    height: 50px !important;
    z-index: 20;
}

.cloud-photo.size-xs {
    width: 40px !important;  /* Réduit de 45px */
    height: 40px !important;
    z-index: 15;
}

/* Zone de sécurité pour le placement */
.wordcloud-safe-zone {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    bottom: 20px;
    pointer-events: none;
    border: 2px dashed rgba(255,255,255,0.1);
    border-radius: 10px;
    z-index: 1;
}

/* Debug - Afficher les limites si nécessaire */
.organic-wordcloud.debug {
    border: 3px solid red !important;
}

.organic-wordcloud.debug::before {
    content: "Zone WordCloud";
    position: absolute;
    top: 5px;
    left: 5px;
    color: red;
    font-size: 12px;
    font-weight: bold;
    z-index: 1000;
}

/* Responsive - Tailles ajustées pour éviter débordement */
@media (max-width: 1200px) {
    .organic-wordcloud {
        min-height: 550px;
        height: 550px;
        padding: 1.5rem;
    }
    
    .cloud-photo.size-xl { width: 80px !important; height: 80px !important; }
    .cloud-photo.size-lg { width: 70px !important; height: 70px !important; }
    .cloud-photo.size-md { width: 60px !important; height: 60px !important; }
    .cloud-photo.size-sm { width: 45px !important; height: 45px !important; }
    .cloud-photo.size-xs { width: 35px !important; height: 35px !important; }
}

@media (max-width: 768px) {
    .organic-wordcloud {
        min-height: 450px;
        height: 450px;
        padding: 1rem;
        border-radius: 12px;
    }
    
    .cloud-photo.size-xl { width: 70px !important; height: 70px !important; }
    .cloud-photo.size-lg { width: 60px !important; height: 60px !important; }
    .cloud-photo.size-md { width: 50px !important; height: 50px !important; }
    .cloud-photo.size-sm { width: 40px !important; height: 40px !important; }
    .cloud-photo.size-xs { width: 30px !important; height: 30px !important; }
}

@media (max-width: 480px) {
    .organic-wordcloud {
        min-height: 350px;
        height: 350px;
        margin: 1rem 0;
    }
    
    .cloud-photo.size-xl { width: 60px !important; height: 60px !important; }
    .cloud-photo.size-lg { width: 50px !important; height: 50px !important; }
    .cloud-photo.size-md { width: 45px !important; height: 45px !important; }
    .cloud-photo.size-sm { width: 35px !important; height: 35px !important; }
    .cloud-photo.size-xs { width: 25px !important; height: 25px !important; }
}
/* Changé de hidden à visible */
    margin: 2rem auto;
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
    padding: 1.5rem;
    z-index: 1; /* Base z-index */
}

/* Photos dans le wordcloud - Visibilité assurée */
.cloud-photo {
    position: absolute;
    cursor: pointer;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 4px 15px rgba(0,0,0,0.12);
    border: 2px solid rgba(255,255,255,0.8);
    z-index: 10; /* Z-index de base pour toutes les photos */
    opacity: 1 !important; /* Forcer la visibilité */
    visibility: visible !important;
    display: block !important;
}

.cloud-photo:hover {
    transform: scale(1.08) rotate(2deg);
    z-index: 1000 !important; /* Très haut au hover */
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    border-color: #fff;
}

/* Tailles photos - Bien définies */
.cloud-photo.size-xl {
    width: 100px !important;
    height: 100px !important;
    z-index: 60; /* Plus haut pour XL */
}

.cloud-photo.size-lg {
    width: 85px !important;
    height: 85px !important;
    z-index: 50; /* Haut pour LG */
}

.cloud-photo.size-md {
    width: 70px !important;
    height: 70px !important;
    z-index: 30; /* Moyen pour MD */
}

.cloud-photo.size-sm {
    width: 55px !important;
    height: 55px !important;
    z-index: 20; /* Bas pour SM */
}

.cloud-photo.size-xs {
    width: 45px !important;
    height: 45px !important;
    z-index: 15; /* Plus bas pour XS */
}

/* Images dans les photos - Visibilité garantie */
.cloud-photo img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    border-radius: 10px;
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
    background: #f0f0f0; /* Fallback si image ne charge pas */
}

/* Experts - Priorité visuelle absolue */
.professional-expert {
    z-index: 100 !important; /* Très haut pour experts */
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.3) !important;
    border: 3px solid rgba(76, 175, 80, 0.8) !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.professional-expert:hover {
    z-index: 1500 !important; /* Maximum au hover */
    transform: scale(1.12) !important;
    box-shadow: 0 10px 30px rgba(76, 175, 80, 0.4) !important;
}

/* Niveaux - Z-index par priorité */
.cloud-photo.level-1 {
    z-index: 100 !important; /* Experts toujours visibles */
    border-color: #4CAF50 !important;
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.3) !important;
}

.cloud-photo.level-2 {
    z-index: 50 !important; /* Intermédiaires */
    border-color: #FF9800 !important;
    box-shadow: 0 4px 15px rgba(255, 152, 0, 0.25) !important;
}

.cloud-photo.level-3 {
    z-index: 25 !important; /* Débutants */
    border-color: #2196F3 !important;
    box-shadow: 0 3px 12px rgba(33, 150, 243, 0.2) !important;
}

/* Badge niveau - Toujours visible */
.cloud-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: bold;
    color: white;
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    z-index: 5; /* Au-dessus de la photo */
    opacity: 1 !important;
    visibility: visible !important;
}

.cloud-badge.level-1 { 
    background: linear-gradient(45deg, #4CAF50, #45a049) !important;
    z-index: 105 !important; /* Au-dessus des experts */
}
.cloud-badge.level-2 { 
    background: linear-gradient(45deg, #FF9800, #f57c00) !important;
    z-index: 55 !important;
}
.cloud-badge.level-3 { 
    background: linear-gradient(45deg, #2196F3, #1976d2) !important;
    z-index: 30 !important;
}

/* Nom flottant - Visible au hover */
.cloud-name {
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.85);
    color: white;
    padding: 0.25rem 0.6rem;
    border-radius: 15px;
    font-size: 0.7rem;
    white-space: nowrap;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    backdrop-filter: blur(8px);
    z-index: 10; /* Au-dessus de la photo */
}

.cloud-photo:hover .cloud-name {
    opacity: 1 !important;
    bottom: -28px;
    z-index: 1001 !important; /* Très haut au hover */
}

/* Particules - En arrière-plan */
.cloud-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.05; /* Très discret */
    z-index: 1 !important; /* Derrière tout */
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    animation: particleFloat 20s linear infinite;
    z-index: 1 !important; /* Derrière tout */
}

/* Animations - Sans interférence */
@keyframes cloudFloat1 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-4px) rotate(0.5deg); }
    66% { transform: translateY(2px) rotate(-0.3deg); }
}

@keyframes cloudFloat2 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-6px) rotate(-0.5deg); }
}

@keyframes cloudFloat3 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    25% { transform: translateY(3px) rotate(0.3deg); }
    75% { transform: translateY(-3px) rotate(-0.3deg); }
}

.cloud-photo.float-1 { animation: cloudFloat1 6s ease-in-out infinite; }
.cloud-photo.float-2 { animation: cloudFloat2 7s ease-in-out infinite; }
.cloud-photo.float-3 { animation: cloudFloat3 6.5s ease-in-out infinite; }

/* Styles professionnels experts - Visibilité renforcée */
.professional-badge {
    background: linear-gradient(45deg, #4CAF50, #45a049) !important;
    font-weight: 600 !important;
    font-size: 0.65rem !important;
    border: 2px solid white !important;
    z-index: 110 !important; /* Maximum pour badge expert */
}

.professional-name {
    background: rgba(76, 175, 80, 0.9) !important;
    color: white !important;
    font-weight: 500 !important;
    font-size: 0.7rem !important;
    border: 1px solid rgba(76, 175, 80, 1) !important;
    z-index: 105 !important; /* Haut pour nom expert */
}

/* Effet expert - Discret mais visible */
.professional-expert::before {
    content: "";
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, rgba(76, 175, 80, 0.1), transparent, rgba(76, 175, 80, 0.1));
    border-radius: 12px;
    z-index: -1; /* Derrière la photo */
    opacity: 0.6;
}

/* Responsive - Visibilité maintenue */
@media (max-width: 768px) {
    .cloud-photo.size-xl { width: 80px !important; height: 80px !important; }
    .cloud-photo.size-lg { width: 70px !important; height: 70px !important; }
    .cloud-photo.size-md { width: 60px !important; height: 60px !important; }
    .cloud-photo.size-sm { width: 50px !important; height: 50px !important; }
    .cloud-photo.size-xs { width: 40px !important; height: 40px !important; }
}

/* Debug - Contour visible si problème */
.cloud-photo.debug {
    border: 3px solid red !important;
    background: rgba(255,0,0,0.1) !important;
}
/* Au lieu de 100% */
    max-width: 1000px; /* Limite maximale */
    min-height: 500px; /* Réduit de 700px à 500px */
    height: 500px; /* Hauteur fixe professionnelle */
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px; /* Réduit de 25px à 15px */
    overflow: hidden;
    margin: 2rem auto; /* Centré avec auto */
    box-shadow: 0 8px 25px rgba(0,0,0,0.12); /* Ombre plus subtile */
    padding: 1.5rem; /* Réduit de 2rem à 1.5rem */
}

.cloud-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 1.1rem; /* Légèrement réduit */
    opacity: 0.8;
}

/* Photos dans le wordcloud - Ajustement pour la nouvelle taille */
.cloud-photo {
    position: absolute;
    cursor: pointer;
    border-radius: 12px; /* Réduit de 15px à 12px */
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 4px 15px rgba(0,0,0,0.12); /* Ombre plus subtile */
    border: 2px solid rgba(255,255,255,0.8);
}

.cloud-photo:hover {
    transform: scale(1.08) rotate(2deg); /* Zoom réduit pour la taille */
    z-index: 1000;
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    border-color: #fff;
}

/* Tailles ajustées pour le format professionnel */
.cloud-photo.size-xl {
    width: 100px; /* Réduit de 140px */
    height: 100px;
    font-weight: 700;
}

.cloud-photo.size-lg {
    width: 85px; /* Réduit de 110px */
    height: 85px;
    font-weight: 600;
}

.cloud-photo.size-md {
    width: 70px; /* Réduit de 85px */
    height: 70px;
    font-weight: 500;
}

.cloud-photo.size-sm {
    width: 55px; /* Réduit de 65px */
    height: 55px;
    font-weight: 400;
}

.cloud-photo.size-xs {
    width: 45px; /* Réduit de 50px */
    height: 45px;
    font-weight: 300;
}

/* Couleurs par niveau - Inchangées */
.cloud-photo.level-1 {
    border-color: #4CAF50;
    box-shadow: 0 0 15px rgba(76, 175, 80, 0.3); /* Ombre réduite */
}

.cloud-photo.level-2 {
    border-color: #FF9800;
    box-shadow: 0 0 12px rgba(255, 152, 0, 0.25);
}

.cloud-photo.level-3 {
    border-color: #2196F3;
    box-shadow: 0 0 10px rgba(33, 150, 243, 0.2);
}

.cloud-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px; /* Réduit de 12px */
}

/* Badge niveau - Ajusté */
.cloud-badge {
    position: absolute;
    top: -6px; /* Réduit de -8px */
    right: -6px;
    width: 20px; /* Réduit de 24px */
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem; /* Réduit de 0.7rem */
    font-weight: bold;
    color: white;
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.cloud-badge.level-1 { background: linear-gradient(45deg, #4CAF50, #45a049); }
.cloud-badge.level-2 { background: linear-gradient(45deg, #FF9800, #f57c00); }
.cloud-badge.level-3 { background: linear-gradient(45deg, #2196F3, #1976d2); }

/* Nom flottant - Ajusté */
.cloud-name {
    position: absolute;
    bottom: -25px; /* Réduit de -30px */
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.85);
    color: white;
    padding: 0.25rem 0.6rem; /* Réduit */
    border-radius: 15px;
    font-size: 0.7rem; /* Réduit de 0.75rem */
    white-space: nowrap;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    backdrop-filter: blur(8px);
}

.cloud-photo:hover .cloud-name {
    opacity: 1;
    bottom: -28px; /* Ajusté */
}

/* Animations flottantes - Réduites */
@keyframes cloudFloat1 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-6px) rotate(1deg); } /* Réduit */
    66% { transform: translateY(3px) rotate(-0.5deg); }
}

@keyframes cloudFloat2 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-8px) rotate(-1deg); } /* Réduit */
}

@keyframes cloudFloat3 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    25% { transform: translateY(4px) rotate(0.5deg); } /* Réduit */
    75% { transform: translateY(-4px) rotate(-0.5deg); }
}

.cloud-photo.float-1 { animation: cloudFloat1 5s ease-in-out infinite; }
.cloud-photo.float-2 { animation: cloudFloat2 6s ease-in-out infinite; }
.cloud-photo.float-3 { animation: cloudFloat3 5.5s ease-in-out infinite; }

/* Effet de particules - Réduit */
.cloud-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.08; /* Réduit de 0.1 */
}

.particle {
    position: absolute;
    width: 3px; /* Réduit de 4px */
    height: 3px;
    background: white;
    border-radius: 50%;
    animation: particleFloat 18s linear infinite; /* Plus lent */
}

@keyframes particleFloat {
    0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
    10% { opacity: 0.8; }
    90% { opacity: 0.8; }
    100% { transform: translateY(-80px) rotate(360deg); opacity: 0; }
}

/* Responsive professionnel */
@media (max-width: 1200px) {
    .organic-wordcloud {
        width: 90%;
        max-width: 900px;
    }
}

@media (max-width: 768px) {
    .organic-wordcloud {
        width: 95%;
        min-height: 400px;
        height: 400px;
        padding: 1rem;
        border-radius: 12px;
    }
    
    .cloud-photo.size-xl { width: 80px; height: 80px; }
    .cloud-photo.size-lg { width: 70px; height: 70px; }
    .cloud-photo.size-md { width: 60px; height: 60px; }
    .cloud-photo.size-sm { width: 50px; height: 50px; }
    .cloud-photo.size-xs { width: 40px; height: 40px; }
    
    .cloud-badge {
        width: 18px;
        height: 18px;
        font-size: 0.6rem;
    }
    
    .cloud-name {
        font-size: 0.65rem;
        padding: 0.2rem 0.5rem;
    }
}

@media (max-width: 480px) {
    .organic-wordcloud {
        width: 98%;
        min-height: 350px;
        height: 350px;
        margin: 1rem auto;
    }
}

/* Styles professionnels pour experts dispersés - Ajustés */
.professional-expert {
    z-index: 50 !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.12) !important; /* Ombre réduite */
    border: 2px solid rgba(76, 175, 80, 0.8) !important;
}

.professional-expert:hover {
    transform: scale(1.08) !important; /* Zoom réduit */
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.25) !important;
    z-index: 100 !important;
}

.professional-badge {
    background: linear-gradient(45deg, #4CAF50, #45a049) !important;
    font-weight: 600 !important;
    font-size: 0.65rem !important; /* Réduit */
    border: 2px solid white !important;
}

.professional-name {
    background: rgba(76, 175, 80, 0.9) !important;
    color: white !important;
    font-weight: 500 !important;
    font-size: 0.7rem !important; /* Réduit */
    border: 1px solid rgba(76, 175, 80, 1) !important;
}

/* Effet subtil pour différencier - Ajusté */
.professional-expert::before {
    content: "";
    position: absolute;
    top: -2px; /* Réduit */
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, rgba(76, 175, 80, 0.15), transparent, rgba(76, 175, 80, 0.15));
    border-radius: 12px;
    z-index: -1;
    opacity: 0.6;
}
/* Tailles par niveau - Experts plus grands */
.photo-wordcloud.level-1 {
    width: 120px;
    height: 120px;
    border: 4px solid #4CAF50;
    z-index: 10;
}

.photo-wordcloud.level-2 {
    width: 90px;
    height: 90px;
    border: 3px solid #FF9800;
    z-index: 5;
}

.photo-wordcloud.level-3 {
    width: 70px;
    height: 70px;
    border: 2px solid #F44336;
    z-index: 1;
}

.photo-wordcloud img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Animations flottantes */
@keyframes float1 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(2deg); }
}

@keyframes float2 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(-2deg); }
}

@keyframes float3 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-8px) rotate(1deg); }
}

.photo-wordcloud.level-1 {
    animation: float1 4s ease-in-out infinite;
}

.photo-wordcloud.level-2 {
    animation: float2 5s ease-in-out infinite;
}

.photo-wordcloud.level-3 {
    animation: float3 6s ease-in-out infinite;
}

/* Badge de niveau sur les photos */
.photo-badge {
    position: absolute;
    bottom: -5px;
    right: -5px;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: bold;
    color: white;
    border: 2px solid white;
}

.photo-badge.level-1 { background: #4CAF50; }
.photo-badge.level-2 { background: #FF9800; }
.photo-badge.level-3 { background: #F44336; }

/* Tooltip nom */
.photo-tooltip {
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 0.3rem 0.6rem;
    border-radius: 15px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.photo-wordcloud:hover .photo-tooltip {
    opacity: 1;
}

/* Effet de particules pour les experts */
.expert-glow {
    position: absolute;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(76,175,80,0.3) 0%, transparent 70%);
    animation: pulse 3s ease-in-out infinite;
    pointer-events: none;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.1); opacity: 0.6; }
}

/* Responsive */
@media (max-width: 768px) {
    .wordcloud-container {
        height: 400px;
    }
    
    .photo-wordcloud.level-1 {
        width: 80px;
        height: 80px;
    }
    
    .photo-wordcloud.level-2 {
        width: 60px;
        height: 60px;
    }
    
    .photo-wordcloud.level-3 {
        width: 45px;
        height: 45px;
    }
}





/* Hauteur augmentée pour plus d'espace */
    height: 700px; /* Plus de place pour toutes les photos */
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    overflow: visible !important; /* Changé à visible pour voir toutes les photos */
    margin: 2rem 0;
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
    padding: 2rem;
    z-index: 1;
    /* Assurer l'affichage de tous les éléments */
    display: block;
}

/* Photos dans le wordcloud - Visibilité garantie */
.cloud-photo {
    position: absolute;
    cursor: pointer;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 4px 15px rgba(0,0,0,0.12);
    border: 2px solid rgba(255,255,255,0.8);
    z-index: 10;
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
    /* Assurer que les photos ne sont jamais cachées */
    pointer-events: auto;
    transform: translateZ(0); /* Force hardware acceleration */
}

/* Hover sans débordement mais visible */
.cloud-photo:hover {
    transform: scale(1.08) translateZ(0) !important;
    z-index: 1000 !important;
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    border-color: #fff;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Tailles photos - Optimisées pour visibilité */
.cloud-photo.size-xl {
    width: 85px !important;
    height: 85px !important;
    z-index: 60;
}

.cloud-photo.size-lg {
    width: 75px !important;
    height: 75px !important;
    z-index: 50;
}

.cloud-photo.size-md {
    width: 65px !important;
    height: 65px !important;
    z-index: 30;
}

.cloud-photo.size-sm {
    width: 55px !important;
    height: 55px !important;
    z-index: 20;
}

.cloud-photo.size-xs {
    width: 45px !important;
    height: 45px !important;
    z-index: 15;
}

/* Experts - Toujours visibles */
.cloud-photo.level-1 {
    z-index: 100 !important;
    border-color: #4CAF50 !important;
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.3) !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.cloud-photo.level-2 {
    z-index: 50 !important;
    border-color: #FF9800 !important;
    box-shadow: 0 4px 15px rgba(255, 152, 0, 0.25) !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.cloud-photo.level-3 {
    z-index: 25 !important;
    border-color: #2196F3 !important;
    box-shadow: 0 3px 12px rgba(33, 150, 243, 0.2) !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Images dans les photos - Toujours visibles */
.cloud-photo img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    border-radius: 10px;
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
    background: #f0f0f0;
}

/* Badge niveau - Toujours au-dessus */
.cloud-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: bold;
    color: white;
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    z-index: 5;
    opacity: 1 !important;
    visibility: visible !important;
}

.cloud-badge.level-1 { 
    background: linear-gradient(45deg, #4CAF50, #45a049) !important;
    z-index: 105 !important;
}
.cloud-badge.level-2 { 
    background: linear-gradient(45deg, #FF9800, #f57c00) !important;
    z-index: 55 !important;
}
.cloud-badge.level-3 { 
    background: linear-gradient(45deg, #2196F3, #1976d2) !important;
    z-index: 30 !important;
}

/* Nom flottant - Visible au hover */
.cloud-name {
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.85);
    color: white;
    padding: 0.25rem 0.6rem;
    border-radius: 15px;
    font-size: 0.7rem;
    white-space: nowrap;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    backdrop-filter: blur(8px);
    z-index: 10;
}

.cloud-photo:hover .cloud-name {
    opacity: 1 !important;
    bottom: -28px;
    z-index: 1001 !important;
    visibility: visible !important;
}

/* Responsive - Hauteur ajustée pour visibilité */
@media (max-width: 1200px) {
    .organic-wordcloud {
        min-height: 650px;
        height: 650px;
        padding: 1.5rem;
    }
    
    .cloud-photo.size-xl { width: 80px !important; height: 80px !important; }
    .cloud-photo.size-lg { width: 70px !important; height: 70px !important; }
    .cloud-photo.size-md { width: 60px !important; height: 60px !important; }
    .cloud-photo.size-sm { width: 50px !important; height: 50px !important; }
    .cloud-photo.size-xs { width: 40px !important; height: 40px !important; }
}

@media (max-width: 768px) {
    .organic-wordcloud {
        min-height: 550px;
        height: 550px;
        padding: 1rem;
        border-radius: 12px;
    }
    
    .cloud-photo.size-xl { width: 70px !important; height: 70px !important; }
    .cloud-photo.size-lg { width: 60px !important; height: 60px !important; }
    .cloud-photo.size-md { width: 50px !important; height: 50px !important; }
    .cloud-photo.size-sm { width: 45px !important; height: 45px !important; }
    .cloud-photo.size-xs { width: 35px !important; height: 35px !important; }
}

@media (max-width: 480px) {
    .organic-wordcloud {
        min-height: 450px;
        height: 450px;
        margin: 1rem 0;
    }
    
    .cloud-photo.size-xl { width: 60px !important; height: 60px !important; }
    .cloud-photo.size-lg { width: 50px !important; height: 50px !important; }
    .cloud-photo.size-md { width: 45px !important; height: 45px !important; }
    .cloud-photo.size-sm { width: 40px !important; height: 40px !important; }
    .cloud-photo.size-xs { width: 30px !important; height: 30px !important; }
}

/* Loading state - Ajusté pour nouvelle hauteur */
.cloud-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.2rem;
    text-align: center;
    z-index: 1000;
}
/* FORCER le clipping */
    margin: 2rem 0;
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
    padding: 2rem;
    z-index: 1;
    /* Créer un contexte de confinement */
    contain: layout style paint;
}

/* Photos dans le wordcloud - Confinement strict */
.cloud-photo {
    position: absolute;
    cursor: pointer;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 4px 15px rgba(0,0,0,0.12);
    border: 2px solid rgba(255,255,255,0.8);
    z-index: 10;
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
    /* Contraintes de position strictes */
    max-width: 100px !important;
    max-height: 100px !important;
    /* Empêcher le débordement */
    contain: layout style paint size;
}

/* Contraintes de position pour éviter le débordement */
.cloud-photo {
    /* Limites minimales */
    min-left: 0px;
    min-top: 0px;
    /* Limites maximales calculées dynamiquement */
}

/* Hover avec contraintes */
.cloud-photo:hover {
    transform: scale(1.05) !important; /* Réduire le scale pour éviter débordement */
    z-index: 1000 !important;
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    border-color: #fff;
    /* Empêcher le débordement au hover */
    max-width: 100px !important;
    max-height: 100px !important;
}

/* Tailles photos - Strictement contrôlées */
.cloud-photo.size-xl {
    width: 90px !important;  /* Réduit de 100px */
    height: 90px !important;
    z-index: 60;
}

.cloud-photo.size-lg {
    width: 80px !important;  /* Réduit de 85px */
    height: 80px !important;
    z-index: 50;
}

.cloud-photo.size-md {
    width: 65px !important;  /* Réduit de 70px */
    height: 65px !important;
    z-index: 30;
}

.cloud-photo.size-sm {
    width: 50px !important;  /* Réduit de 55px */
    height: 50px !important;
    z-index: 20;
}

.cloud-photo.size-xs {
    width: 40px !important;  /* Réduit de 45px */
    height: 40px !important;
    z-index: 15;
}

/* Zone de sécurité pour le placement */
.wordcloud-safe-zone {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    bottom: 20px;
    pointer-events: none;
    border: 2px dashed rgba(255,255,255,0.1);
    border-radius: 10px;
    z-index: 1;
}

/* Debug - Afficher les limites si nécessaire */
.organic-wordcloud.debug {
    border: 3px solid red !important;
}

.organic-wordcloud.debug::before {
    content: "Zone WordCloud";
    position: absolute;
    top: 5px;
    left: 5px;
    color: red;
    font-size: 12px;
    font-weight: bold;
    z-index: 1000;
}

/* Responsive - Tailles ajustées pour éviter débordement */
@media (max-width: 1200px) {
    .organic-wordcloud {
        min-height: 550px;
        height: 550px;
        padding: 1.5rem;
    }
    
    .cloud-photo.size-xl { width: 80px !important; height: 80px !important; }
    .cloud-photo.size-lg { width: 70px !important; height: 70px !important; }
    .cloud-photo.size-md { width: 60px !important; height: 60px !important; }
    .cloud-photo.size-sm { width: 45px !important; height: 45px !important; }
    .cloud-photo.size-xs { width: 35px !important; height: 35px !important; }
}

@media (max-width: 768px) {
    .organic-wordcloud {
        min-height: 450px;
        height: 450px;
        padding: 1rem;
        border-radius: 12px;
    }
    
    .cloud-photo.size-xl { width: 70px !important; height: 70px !important; }
    .cloud-photo.size-lg { width: 60px !important; height: 60px !important; }
    .cloud-photo.size-md { width: 50px !important; height: 50px !important; }
    .cloud-photo.size-sm { width: 40px !important; height: 40px !important; }
    .cloud-photo.size-xs { width: 30px !important; height: 30px !important; }
}

@media (max-width: 480px) {
    .organic-wordcloud {
        min-height: 350px;
        height: 350px;
        margin: 1rem 0;
    }
    
    .cloud-photo.size-xl { width: 60px !important; height: 60px !important; }
    .cloud-photo.size-lg { width: 50px !important; height: 50px !important; }
    .cloud-photo.size-md { width: 45px !important; height: 45px !important; }
    .cloud-photo.size-sm { width: 35px !important; height: 35px !important; }
    .cloud-photo.size-xs { width: 25px !important; height: 25px !important; }
}
/* Changé de hidden à visible */
    margin: 2rem auto;
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
    padding: 1.5rem;
    z-index: 1; /* Base z-index */
}

/* Photos dans le wordcloud - Visibilité assurée */
.cloud-photo {
    position: absolute;
    cursor: pointer;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 4px 15px rgba(0,0,0,0.12);
    border: 2px solid rgba(255,255,255,0.8);
    z-index: 10; /* Z-index de base pour toutes les photos */
    opacity: 1 !important; /* Forcer la visibilité */
    visibility: visible !important;
    display: block !important;
}

.cloud-photo:hover {
    transform: scale(1.08) rotate(2deg);
    z-index: 1000 !important; /* Très haut au hover */
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    border-color: #fff;
}

/* Tailles photos - Bien définies */
.cloud-photo.size-xl {
    width: 100px !important;
    height: 100px !important;
    z-index: 60; /* Plus haut pour XL */
}

.cloud-photo.size-lg {
    width: 85px !important;
    height: 85px !important;
    z-index: 50; /* Haut pour LG */
}

.cloud-photo.size-md {
    width: 70px !important;
    height: 70px !important;
    z-index: 30; /* Moyen pour MD */
}

.cloud-photo.size-sm {
    width: 55px !important;
    height: 55px !important;
    z-index: 20; /* Bas pour SM */
}

.cloud-photo.size-xs {
    width: 45px !important;
    height: 45px !important;
    z-index: 15; /* Plus bas pour XS */
}

/* Images dans les photos - Visibilité garantie */
.cloud-photo img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    border-radius: 10px;
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
    background: #f0f0f0; /* Fallback si image ne charge pas */
}

/* Experts - Priorité visuelle absolue */
.professional-expert {
    z-index: 100 !important; /* Très haut pour experts */
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.3) !important;
    border: 3px solid rgba(76, 175, 80, 0.8) !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.professional-expert:hover {
    z-index: 1500 !important; /* Maximum au hover */
    transform: scale(1.12) !important;
    box-shadow: 0 10px 30px rgba(76, 175, 80, 0.4) !important;
}

/* Niveaux - Z-index par priorité */
.cloud-photo.level-1 {
    z-index: 100 !important; /* Experts toujours visibles */
    border-color: #4CAF50 !important;
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.3) !important;
}

.cloud-photo.level-2 {
    z-index: 50 !important; /* Intermédiaires */
    border-color: #FF9800 !important;
    box-shadow: 0 4px 15px rgba(255, 152, 0, 0.25) !important;
}

.cloud-photo.level-3 {
    z-index: 25 !important; /* Débutants */
    border-color: #2196F3 !important;
    box-shadow: 0 3px 12px rgba(33, 150, 243, 0.2) !important;
}

/* Badge niveau - Toujours visible */
.cloud-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: bold;
    color: white;
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    z-index: 5; /* Au-dessus de la photo */
    opacity: 1 !important;
    visibility: visible !important;
}

.cloud-badge.level-1 { 
    background: linear-gradient(45deg, #4CAF50, #45a049) !important;
    z-index: 105 !important; /* Au-dessus des experts */
}
.cloud-badge.level-2 { 
    background: linear-gradient(45deg, #FF9800, #f57c00) !important;
    z-index: 55 !important;
}
.cloud-badge.level-3 { 
    background: linear-gradient(45deg, #2196F3, #1976d2) !important;
    z-index: 30 !important;
}

/* Nom flottant - Visible au hover */
.cloud-name {
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.85);
    color: white;
    padding: 0.25rem 0.6rem;
    border-radius: 15px;
    font-size: 0.7rem;
    white-space: nowrap;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    backdrop-filter: blur(8px);
    z-index: 10; /* Au-dessus de la photo */
}

.cloud-photo:hover .cloud-name {
    opacity: 1 !important;
    bottom: -28px;
    z-index: 1001 !important; /* Très haut au hover */
}

/* Particules - En arrière-plan */
.cloud-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.05; /* Très discret */
    z-index: 1 !important; /* Derrière tout */
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    animation: particleFloat 20s linear infinite;
    z-index: 1 !important; /* Derrière tout */
}

/* Animations - Sans interférence */
@keyframes cloudFloat1 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-4px) rotate(0.5deg); }
    66% { transform: translateY(2px) rotate(-0.3deg); }
}

@keyframes cloudFloat2 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-6px) rotate(-0.5deg); }
}

@keyframes cloudFloat3 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    25% { transform: translateY(3px) rotate(0.3deg); }
    75% { transform: translateY(-3px) rotate(-0.3deg); }
}

.cloud-photo.float-1 { animation: cloudFloat1 6s ease-in-out infinite; }
.cloud-photo.float-2 { animation: cloudFloat2 7s ease-in-out infinite; }
.cloud-photo.float-3 { animation: cloudFloat3 6.5s ease-in-out infinite; }

/* Styles professionnels experts - Visibilité renforcée */
.professional-badge {
    background: linear-gradient(45deg, #4CAF50, #45a049) !important;
    font-weight: 600 !important;
    font-size: 0.65rem !important;
    border: 2px solid white !important;
    z-index: 110 !important; /* Maximum pour badge expert */
}

.professional-name {
    background: rgba(76, 175, 80, 0.9) !important;
    color: white !important;
    font-weight: 500 !important;
    font-size: 0.7rem !important;
    border: 1px solid rgba(76, 175, 80, 1) !important;
    z-index: 105 !important; /* Haut pour nom expert */
}

/* Effet expert - Discret mais visible */
.professional-expert::before {
    content: "";
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, rgba(76, 175, 80, 0.1), transparent, rgba(76, 175, 80, 0.1));
    border-radius: 12px;
    z-index: -1; /* Derrière la photo */
    opacity: 0.6;
}

/* Responsive - Visibilité maintenue */
@media (max-width: 768px) {
    .cloud-photo.size-xl { width: 80px !important; height: 80px !important; }
    .cloud-photo.size-lg { width: 70px !important; height: 70px !important; }
    .cloud-photo.size-md { width: 60px !important; height: 60px !important; }
    .cloud-photo.size-sm { width: 50px !important; height: 50px !important; }
    .cloud-photo.size-xs { width: 40px !important; height: 40px !important; }
}

/* Debug - Contour visible si problème */
.cloud-photo.debug {
    border: 3px solid red !important;
    background: rgba(255,0,0,0.1) !important;
}
/* Au lieu de 100% */
    max-width: 1000px; /* Limite maximale */
    min-height: 500px; /* Réduit de 700px à 500px */
    height: 500px; /* Hauteur fixe professionnelle */
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px; /* Réduit de 25px à 15px */
    overflow: hidden;
    margin: 2rem auto; /* Centré avec auto */
    box-shadow: 0 8px 25px rgba(0,0,0,0.12); /* Ombre plus subtile */
    padding: 1.5rem; /* Réduit de 2rem à 1.5rem */
}

.cloud-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 1.1rem; /* Légèrement réduit */
    opacity: 0.8;
}

/* Photos dans le wordcloud - Ajustement pour la nouvelle taille */
.cloud-photo {
    position: absolute;
    cursor: pointer;
    border-radius: 12px; /* Réduit de 15px à 12px */
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 4px 15px rgba(0,0,0,0.12); /* Ombre plus subtile */
    border: 2px solid rgba(255,255,255,0.8);
}

.cloud-photo:hover {
    transform: scale(1.08) rotate(2deg); /* Zoom réduit pour la taille */
    z-index: 1000;
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    border-color: #fff;
}

/* Tailles ajustées pour le format professionnel */
.cloud-photo.size-xl {
    width: 100px; /* Réduit de 140px */
    height: 100px;
    font-weight: 700;
}

.cloud-photo.size-lg {
    width: 85px; /* Réduit de 110px */
    height: 85px;
    font-weight: 600;
}

.cloud-photo.size-md {
    width: 70px; /* Réduit de 85px */
    height: 70px;
    font-weight: 500;
}

.cloud-photo.size-sm {
    width: 55px; /* Réduit de 65px */
    height: 55px;
    font-weight: 400;
}

.cloud-photo.size-xs {
    width: 45px; /* Réduit de 50px */
    height: 45px;
    font-weight: 300;
}

/* Couleurs par niveau - Inchangées */
.cloud-photo.level-1 {
    border-color: #4CAF50;
    box-shadow: 0 0 15px rgba(76, 175, 80, 0.3); /* Ombre réduite */
}

.cloud-photo.level-2 {
    border-color: #FF9800;
    box-shadow: 0 0 12px rgba(255, 152, 0, 0.25);
}

.cloud-photo.level-3 {
    border-color: #2196F3;
    box-shadow: 0 0 10px rgba(33, 150, 243, 0.2);
}

.cloud-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px; /* Réduit de 12px */
}

/* Badge niveau - Ajusté */
.cloud-badge {
    position: absolute;
    top: -6px; /* Réduit de -8px */
    right: -6px;
    width: 20px; /* Réduit de 24px */
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem; /* Réduit de 0.7rem */
    font-weight: bold;
    color: white;
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.cloud-badge.level-1 { background: linear-gradient(45deg, #4CAF50, #45a049); }
.cloud-badge.level-2 { background: linear-gradient(45deg, #FF9800, #f57c00); }
.cloud-badge.level-3 { background: linear-gradient(45deg, #2196F3, #1976d2); }

/* Nom flottant - Ajusté */
.cloud-name {
    position: absolute;
    bottom: -25px; /* Réduit de -30px */
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.85);
    color: white;
    padding: 0.25rem 0.6rem; /* Réduit */
    border-radius: 15px;
    font-size: 0.7rem; /* Réduit de 0.75rem */
    white-space: nowrap;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    backdrop-filter: blur(8px);
}

.cloud-photo:hover .cloud-name {
    opacity: 1;
    bottom: -28px; /* Ajusté */
}

/* Animations flottantes - Réduites */
@keyframes cloudFloat1 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-6px) rotate(1deg); } /* Réduit */
    66% { transform: translateY(3px) rotate(-0.5deg); }
}

@keyframes cloudFloat2 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-8px) rotate(-1deg); } /* Réduit */
}

@keyframes cloudFloat3 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    25% { transform: translateY(4px) rotate(0.5deg); } /* Réduit */
    75% { transform: translateY(-4px) rotate(-0.5deg); }
}

.cloud-photo.float-1 { animation: cloudFloat1 5s ease-in-out infinite; }
.cloud-photo.float-2 { animation: cloudFloat2 6s ease-in-out infinite; }
.cloud-photo.float-3 { animation: cloudFloat3 5.5s ease-in-out infinite; }

/* Effet de particules - Réduit */
.cloud-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.08; /* Réduit de 0.1 */
}

.particle {
    position: absolute;
    width: 3px; /* Réduit de 4px */
    height: 3px;
    background: white;
    border-radius: 50%;
    animation: particleFloat 18s linear infinite; /* Plus lent */
}

@keyframes particleFloat {
    0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
    10% { opacity: 0.8; }
    90% { opacity: 0.8; }
    100% { transform: translateY(-80px) rotate(360deg); opacity: 0; }
}

/* Responsive professionnel */
@media (max-width: 1200px) {
    .organic-wordcloud {
        width: 90%;
        max-width: 900px;
    }
}

@media (max-width: 768px) {
    .organic-wordcloud {
        width: 95%;
        min-height: 400px;
        height: 400px;
        padding: 1rem;
        border-radius: 12px;
    }
    
    .cloud-photo.size-xl { width: 80px; height: 80px; }
    .cloud-photo.size-lg { width: 70px; height: 70px; }
    .cloud-photo.size-md { width: 60px; height: 60px; }
    .cloud-photo.size-sm { width: 50px; height: 50px; }
    .cloud-photo.size-xs { width: 40px; height: 40px; }
    
    .cloud-badge {
        width: 18px;
        height: 18px;
        font-size: 0.6rem;
    }
    
    .cloud-name {
        font-size: 0.65rem;
        padding: 0.2rem 0.5rem;
    }
}

@media (max-width: 480px) {
    .organic-wordcloud {
        width: 98%;
        min-height: 350px;
        height: 350px;
        margin: 1rem auto;
    }
}

/* Styles professionnels pour experts dispersés - Ajustés */
.professional-expert {
    z-index: 50 !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.12) !important; /* Ombre réduite */
    border: 2px solid rgba(76, 175, 80, 0.8) !important;
}

.professional-expert:hover {
    transform: scale(1.08) !important; /* Zoom réduit */
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.25) !important;
    z-index: 100 !important;
}

.professional-badge {
    background: linear-gradient(45deg, #4CAF50, #45a049) !important;
    font-weight: 600 !important;
    font-size: 0.65rem !important; /* Réduit */
    border: 2px solid white !important;
}

.professional-name {
    background: rgba(76, 175, 80, 0.9) !important;
    color: white !important;
    font-weight: 500 !important;
    font-size: 0.7rem !important; /* Réduit */
    border: 1px solid rgba(76, 175, 80, 1) !important;
}

/* Effet subtil pour différencier - Ajusté */
.professional-expert::before {
    content: "";
    position: absolute;
    top: -2px; /* Réduit */
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, rgba(76, 175, 80, 0.15), transparent, rgba(76, 175, 80, 0.15));
    border-radius: 12px;
    z-index: -1;
    opacity: 0.6;
}
/* Photos dans le wordcloud */
.cloud-photo {
    position: absolute;
    cursor: pointer;
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border: 3px solid rgba(255,255,255,0.8);
}

.cloud-photo:hover {
    transform: scale(1.15) rotate(3deg);
    z-index: 1000;
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
    border-color: #fff;
}

/* Tailles variables comme un vrai wordcloud */
.cloud-photo.size-xl {
    width: 140px;
    height: 140px;
    font-weight: 900;
}

.cloud-photo.size-lg {
    width: 110px;
    height: 110px;
    font-weight: 700;
}

.cloud-photo.size-md {
    width: 85px;
    height: 85px;
    font-weight: 500;
}

.cloud-photo.size-sm {
    width: 65px;
    height: 65px;
    font-weight: 400;
}

.cloud-photo.size-xs {
    width: 50px;
    height: 50px;
    font-weight: 300;
}

/* Couleurs par niveau */
.cloud-photo.level-1 {
    border-color: #4CAF50;
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.4);
}

.cloud-photo.level-2 {
    border-color: #FF9800;
    box-shadow: 0 0 15px rgba(255, 152, 0, 0.3);
}

.cloud-photo.level-3 {
    border-color: #2196F3;
    box-shadow: 0 0 10px rgba(33, 150, 243, 0.3);
}

.cloud-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

/* Badge niveau discret */
.cloud-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: bold;
    color: white;
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.cloud-badge.level-1 { background: linear-gradient(45deg, #4CAF50, #45a049); }
.cloud-badge.level-2 { background: linear-gradient(45deg, #FF9800, #f57c00); }
.cloud-badge.level-3 { background: linear-gradient(45deg, #2196F3, #1976d2); }

/* Nom flottant */
.cloud-name {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    backdrop-filter: blur(10px);
}

.cloud-photo:hover .cloud-name {
    opacity: 1;
    bottom: -35px;
}

/* Animations flottantes organiques */
@keyframes cloudFloat1 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-8px) rotate(1deg); }
    66% { transform: translateY(4px) rotate(-0.5deg); }
}

@keyframes cloudFloat2 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-12px) rotate(-1deg); }
}

@keyframes cloudFloat3 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    25% { transform: translateY(6px) rotate(0.5deg); }
    75% { transform: translateY(-6px) rotate(-0.5deg); }
}

.cloud-photo.float-1 { animation: cloudFloat1 6s ease-in-out infinite; }
.cloud-photo.float-2 { animation: cloudFloat2 8s ease-in-out infinite; }
.cloud-photo.float-3 { animation: cloudFloat3 7s ease-in-out infinite; }

/* Effet de particules de fond */
.cloud-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.1;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: white;
    border-radius: 50%;
    animation: particleFloat 15s linear infinite;
}

@keyframes particleFloat {
    0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-100px) rotate(360deg); opacity: 0; }
}

/* Responsive */
@media (max-width: 768px) {
    .organic-wordcloud {
        min-height: 500px;
        padding: 1rem;
    }
    
    .cloud-photo.size-xl { width: 100px; height: 100px; }
    .cloud-photo.size-lg { width: 80px; height: 80px; }
    .cloud-photo.size-md { width: 65px; height: 65px; }
    .cloud-photo.size-sm { width: 50px; height: 50px; }
    .cloud-photo.size-xs { width: 40px; height: 40px; }
}

/* Effet de brillance sur les experts */
.cloud-photo.level-1::before {
    content: "";
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.3), transparent);
    border-radius: 17px;
    z-index: -1;
    animation: shine 3s ease-in-out infinite;
}

@keyframes shine {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}

/* Effets spéciaux pour les experts prioritaires */
.expert-priority {
    z-index: 100 !important;
}

.expert-priority-glow {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,215,0,0.4) 0%, rgba(255,215,0,0.1) 50%, transparent 100%);
    animation: expertGlow 2s ease-in-out infinite;
    pointer-events: none;
    z-index: 99;
}

@keyframes expertGlow {
    0%, 100% { 
        transform: scale(1); 
        opacity: 0.6; 
    }
    50% { 
        transform: scale(1.1); 
        opacity: 1; 
    }
}

.expert-badge {
    background: linear-gradient(45deg, #FFD700, #FFA500) !important;
    font-size: 0.8rem !important;
    animation: expertBadgePulse 1.5s ease-in-out infinite;
}

@keyframes expertBadgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.expert-name {
    background: linear-gradient(45deg, rgba(255,215,0,0.9), rgba(255,165,0,0.9)) !important;
    font-weight: bold !important;
    border: 1px solid #FFD700 !important;
}

.cloud-photo.expert-priority:hover {
    transform: scale(1.25) rotate(5deg) !important;
    box-shadow: 0 20px 50px rgba(255,215,0,0.4) !important;
}

/* Styles professionnels pour experts dispersés */
.professional-expert {
    z-index: 50 !important;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15) !important;
    border: 2px solid rgba(76, 175, 80, 0.8) !important;
}

.professional-expert:hover {
    transform: scale(1.1) !important;
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.3) !important;
    z-index: 100 !important;
}

.professional-badge {
    background: linear-gradient(45deg, #4CAF50, #45a049) !important;
    font-weight: 600 !important;
    font-size: 0.75rem !important;
    border: 2px solid white !important;
}

.professional-name {
    background: rgba(76, 175, 80, 0.9) !important;
    color: white !important;
    font-weight: 500 !important;
    font-size: 0.8rem !important;
    border: 1px solid rgba(76, 175, 80, 1) !important;
}

/* Assurer que les experts sont toujours visibles */
.cloud-photo.level-1 {
    position: relative !important;
}

/* Effet subtil pour différencier sans être tape-à-l'œil */
.professional-expert::before {
    content: "";
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: linear-gradient(45deg, rgba(76, 175, 80, 0.2), transparent, rgba(76, 175, 80, 0.2));
    border-radius: 15px;
    z-index: -1;
    opacity: 0.7;
}

/* Notifications Admin */
.alert {
    padding: 1rem 1.5rem;
    margin: 1rem 0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: opacity 0.3s ease;
}

.alert-success {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert i {
    font-size: 1.2rem;
}

/* Animation de mise à jour */
.wordcloud-updating {
    opacity: 0.7;
    pointer-events: none;
}

.wordcloud-updating::after {
    content: "Mise à jour en cours...";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1.1rem;
    z-index: 1000;
}

/* Même largeur que wordcloud */
    max-width: 1000px; /* Même max-width que wordcloud */
    min-height: 500px; /* Même hauteur que wordcloud */
    height: 500px; /* Hauteur fixe identique */
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px; /* Même border-radius */
    margin: 2rem auto; /* Même centrage */
    box-shadow: 0 8px 25px rgba(0,0,0,0.12); /* Même ombre */
    padding: 1.5rem; /* Même padding */
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Calendrier compact en haut */
.calendar-compact {
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
    backdrop-filter: blur(10px);
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    color: white;
}

.calendar-header span {
    font-size: 1.1rem;
    font-weight: 600;
}

.calendar-nav {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.calendar-nav:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.1);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.25rem;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.9);
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.calendar-day:hover {
    background: rgba(255,255,255,0.1);
}

.calendar-day.today {
    background: rgba(76, 175, 80, 0.8);
    color: white;
    font-weight: bold;
}

.calendar-day.has-event {
    background: rgba(255, 193, 7, 0.6);
    color: white;
}

/* Liste des événements - Scrollable */
.events-list {
    flex: 1;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.events-list::-webkit-scrollbar {
    width: 6px;
}

.events-list::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
}

.events-list::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.3);
    border-radius: 3px;
}

.events-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.5);
}

/* Événements individuels */
.event-item {
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    transition: all 0.3s ease;
}

.event-item:hover {
    background: rgba(255,255,255,0.15);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.event-date {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.8);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.event-details h4 {
    color: white;
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
}

.event-details p {
    color: rgba(255,255,255,0.9);
    margin: 0 0 0.5rem 0;
    font-size: 0.85rem;
    line-height: 1.4;
}

.event-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
    font-size: 0.75rem;
}

.event-cost {
    background: rgba(76, 175, 80, 0.8);
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-weight: 500;
}

.event-speakers {
    color: rgba(255,255,255,0.8);
    font-style: italic;
}

/* État vide */
.events-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: rgba(255,255,255,0.7);
    text-align: center;
}

.events-empty i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.events-empty h3 {
    margin: 0 0 0.5rem 0;
    color: white;
}

.events-empty p {
    margin: 0;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 1200px) {
    .events-container {
        width: 90%;
        max-width: 900px;
    }
}

@media (max-width: 768px) {
    .events-container {
        width: 95%;
        min-height: 400px;
        height: 400px;
        padding: 1rem;
        border-radius: 12px;
    }
    
    .calendar-compact {
        padding: 0.75rem;
    }
    
    .calendar-header span {
        font-size: 1rem;
    }
    
    .calendar-nav {
        width: 30px;
        height: 30px;
    }
    
    .event-item {
        padding: 0.75rem;
    }
    
    .event-details h4 {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .events-container {
        width: 98%;
        min-height: 350px;
        height: 350px;
        margin: 1rem auto;
    }
}

/* Même largeur que wordcloud */
    max-width: 1000px; /* Même max-width que wordcloud */
    min-height: 500px; /* Même hauteur que wordcloud */
    height: 500px; /* Hauteur fixe identique */
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px; /* Même border-radius */
    margin: 2rem auto; /* Même centrage */
    box-shadow: 0 8px 25px rgba(0,0,0,0.12); /* Même ombre */
    padding: 1.5rem; /* Même padding */
    overflow: hidden;
}

/* Liste des événements - Pleine hauteur */
.events-list {
    height: 100%;
    overflow-y: auto;
    padding-right: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.events-list::-webkit-scrollbar {
    width: 8px;
}

.events-list::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
}

.events-list::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.3);
    border-radius: 4px;
}

.events-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.5);
}

/* Événements individuels - Plus grands */
.event-item {
    background: rgba(255,255,255,0.1);
    border-radius: 15px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.event-item:hover {
    background: rgba(255,255,255,0.15);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-color: rgba(255,255,255,0.3);
}

.event-date {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.8);
    margin-bottom: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.event-details h4 {
    color: white;
    margin: 0 0 1rem 0;
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.3;
}

.event-details p {
    color: rgba(255,255,255,0.9);
    margin: 0 0 1rem 0;
    font-size: 1rem;
    line-height: 1.6;
}

.event-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    font-size: 0.85rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.event-cost {
    background: rgba(76, 175, 80, 0.9);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.8rem;
}

.event-speakers {
    color: rgba(255,255,255,0.8);
    font-style: italic;
    font-size: 0.85rem;
}

/* État vide - Pleine carte */
.events-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: rgba(255,255,255,0.7);
    text-align: center;
}

.events-empty i {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    opacity: 0.5;
}

.events-empty h3 {
    margin: 0 0 1rem 0;
    color: white;
    font-size: 1.5rem;
}

.events-empty p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.5;
}

/* Animation d'entrée pour les événements */
.event-item {
    opacity: 0;
    transform: translateY(20px);
    animation: eventFadeIn 0.6s ease forwards;
}

.event-item:nth-child(1) { animation-delay: 0.1s; }
.event-item:nth-child(2) { animation-delay: 0.2s; }
.event-item:nth-child(3) { animation-delay: 0.3s; }
.event-item:nth-child(4) { animation-delay: 0.4s; }
.event-item:nth-child(5) { animation-delay: 0.5s; }

@keyframes eventFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive - Événements pleine carte */
@media (max-width: 1200px) {
    /* Supprimer les anciens styles de calendrier */
.calendar-section,
.calendar,
.calendar-header,
.calendar-grid,
.calendar-day,
.calendar-compact,
.calendar-nav,
.events-container {
    display: none !important;
}

/* Section WordCloud - Pleine largeur */
.chart-section {
    grid-column: 1 / -1; /* Occupe toute la largeur du grid */
    margin-bottom: 3rem;
    width: 100%;
}



/* Hauteur augmentée pour plus d'espace */
    height: 700px; /* Plus de place pour toutes les photos */
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    overflow: visible !important; /* Changé à visible pour voir toutes les photos */
    margin: 2rem 0;
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
    padding: 2rem;
    z-index: 1;
    /* Assurer l'affichage de tous les éléments */
    display: block;
}

/* Photos dans le wordcloud - Visibilité garantie */
.cloud-photo {
    position: absolute;
    cursor: pointer;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 4px 15px rgba(0,0,0,0.12);
    border: 2px solid rgba(255,255,255,0.8);
    z-index: 10;
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
    /* Assurer que les photos ne sont jamais cachées */
    pointer-events: auto;
    transform: translateZ(0); /* Force hardware acceleration */
}

/* Hover sans débordement mais visible */
.cloud-photo:hover {
    transform: scale(1.08) translateZ(0) !important;
    z-index: 1000 !important;
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    border-color: #fff;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Tailles photos - Optimisées pour visibilité */
.cloud-photo.size-xl {
    width: 85px !important;
    height: 85px !important;
    z-index: 60;
}

.cloud-photo.size-lg {
    width: 75px !important;
    height: 75px !important;
    z-index: 50;
}

.cloud-photo.size-md {
    width: 65px !important;
    height: 65px !important;
    z-index: 30;
}

.cloud-photo.size-sm {
    width: 55px !important;
    height: 55px !important;
    z-index: 20;
}

.cloud-photo.size-xs {
    width: 45px !important;
    height: 45px !important;
    z-index: 15;
}

/* Experts - Toujours visibles */
.cloud-photo.level-1 {
    z-index: 100 !important;
    border-color: #4CAF50 !important;
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.3) !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.cloud-photo.level-2 {
    z-index: 50 !important;
    border-color: #FF9800 !important;
    box-shadow: 0 4px 15px rgba(255, 152, 0, 0.25) !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.cloud-photo.level-3 {
    z-index: 25 !important;
    border-color: #2196F3 !important;
    box-shadow: 0 3px 12px rgba(33, 150, 243, 0.2) !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Images dans les photos - Toujours visibles */
.cloud-photo img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    border-radius: 10px;
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
    background: #f0f0f0;
}

/* Badge niveau - Toujours au-dessus */
.cloud-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: bold;
    color: white;
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    z-index: 5;
    opacity: 1 !important;
    visibility: visible !important;
}

.cloud-badge.level-1 { 
    background: linear-gradient(45deg, #4CAF50, #45a049) !important;
    z-index: 105 !important;
}
.cloud-badge.level-2 { 
    background: linear-gradient(45deg, #FF9800, #f57c00) !important;
    z-index: 55 !important;
}
.cloud-badge.level-3 { 
    background: linear-gradient(45deg, #2196F3, #1976d2) !important;
    z-index: 30 !important;
}

/* Nom flottant - Visible au hover */
.cloud-name {
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.85);
    color: white;
    padding: 0.25rem 0.6rem;
    border-radius: 15px;
    font-size: 0.7rem;
    white-space: nowrap;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    backdrop-filter: blur(8px);
    z-index: 10;
}

.cloud-photo:hover .cloud-name {
    opacity: 1 !important;
    bottom: -28px;
    z-index: 1001 !important;
    visibility: visible !important;
}

/* Responsive - Hauteur ajustée pour visibilité */
@media (max-width: 1200px) {
    .organic-wordcloud {
        min-height: 650px;
        height: 650px;
        padding: 1.5rem;
    }
    
    .cloud-photo.size-xl { width: 80px !important; height: 80px !important; }
    .cloud-photo.size-lg { width: 70px !important; height: 70px !important; }
    .cloud-photo.size-md { width: 60px !important; height: 60px !important; }
    .cloud-photo.size-sm { width: 50px !important; height: 50px !important; }
    .cloud-photo.size-xs { width: 40px !important; height: 40px !important; }
}

@media (max-width: 768px) {
    .organic-wordcloud {
        min-height: 550px;
        height: 550px;
        padding: 1rem;
        border-radius: 12px;
    }
    
    .cloud-photo.size-xl { width: 70px !important; height: 70px !important; }
    .cloud-photo.size-lg { width: 60px !important; height: 60px !important; }
    .cloud-photo.size-md { width: 50px !important; height: 50px !important; }
    .cloud-photo.size-sm { width: 45px !important; height: 45px !important; }
    .cloud-photo.size-xs { width: 35px !important; height: 35px !important; }
}

@media (max-width: 480px) {
    .organic-wordcloud {
        min-height: 450px;
        height: 450px;
        margin: 1rem 0;
    }
    
    .cloud-photo.size-xl { width: 60px !important; height: 60px !important; }
    .cloud-photo.size-lg { width: 50px !important; height: 50px !important; }
    .cloud-photo.size-md { width: 45px !important; height: 45px !important; }
    .cloud-photo.size-sm { width: 40px !important; height: 40px !important; }
    .cloud-photo.size-xs { width: 30px !important; height: 30px !important; }
}

/* Loading state - Ajusté pour nouvelle hauteur */
.cloud-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.2rem;
    text-align: center;
    z-index: 1000;
}
/* FORCER le clipping */
    margin: 2rem 0;
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
    padding: 2rem;
    z-index: 1;
    /* Créer un contexte de confinement */
    contain: layout style paint;
}

/* Photos dans le wordcloud - Confinement strict */
.cloud-photo {
    position: absolute;
    cursor: pointer;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 4px 15px rgba(0,0,0,0.12);
    border: 2px solid rgba(255,255,255,0.8);
    z-index: 10;
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
    /* Contraintes de position strictes */
    max-width: 100px !important;
    max-height: 100px !important;
    /* Empêcher le débordement */
    contain: layout style paint size;
}

/* Contraintes de position pour éviter le débordement */
.cloud-photo {
    /* Limites minimales */
    min-left: 0px;
    min-top: 0px;
    /* Limites maximales calculées dynamiquement */
}

/* Hover avec contraintes */
.cloud-photo:hover {
    transform: scale(1.05) !important; /* Réduire le scale pour éviter débordement */
    z-index: 1000 !important;
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    border-color: #fff;
    /* Empêcher le débordement au hover */
    max-width: 100px !important;
    max-height: 100px !important;
}

/* Tailles photos - Strictement contrôlées */
.cloud-photo.size-xl {
    width: 90px !important;  /* Réduit de 100px */
    height: 90px !important;
    z-index: 60;
}

.cloud-photo.size-lg {
    width: 80px !important;  /* Réduit de 85px */
    height: 80px !important;
    z-index: 50;
}

.cloud-photo.size-md {
    width: 65px !important;  /* Réduit de 70px */
    height: 65px !important;
    z-index: 30;
}

.cloud-photo.size-sm {
    width: 50px !important;  /* Réduit de 55px */
    height: 50px !important;
    z-index: 20;
}

.cloud-photo.size-xs {
    width: 40px !important;  /* Réduit de 45px */
    height: 40px !important;
    z-index: 15;
}

/* Zone de sécurité pour le placement */
.wordcloud-safe-zone {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    bottom: 20px;
    pointer-events: none;
    border: 2px dashed rgba(255,255,255,0.1);
    border-radius: 10px;
    z-index: 1;
}

/* Debug - Afficher les limites si nécessaire */
.organic-wordcloud.debug {
    border: 3px solid red !important;
}

.organic-wordcloud.debug::before {
    content: "Zone WordCloud";
    position: absolute;
    top: 5px;
    left: 5px;
    color: red;
    font-size: 12px;
    font-weight: bold;
    z-index: 1000;
}

/* Responsive - Tailles ajustées pour éviter débordement */
@media (max-width: 1200px) {
    .organic-wordcloud {
        min-height: 550px;
        height: 550px;
        padding: 1.5rem;
    }
    
    .cloud-photo.size-xl { width: 80px !important; height: 80px !important; }
    .cloud-photo.size-lg { width: 70px !important; height: 70px !important; }
    .cloud-photo.size-md { width: 60px !important; height: 60px !important; }
    .cloud-photo.size-sm { width: 45px !important; height: 45px !important; }
    .cloud-photo.size-xs { width: 35px !important; height: 35px !important; }
}

@media (max-width: 768px) {
    .organic-wordcloud {
        min-height: 450px;
        height: 450px;
        padding: 1rem;
        border-radius: 12px;
    }
    
    .cloud-photo.size-xl { width: 70px !important; height: 70px !important; }
    .cloud-photo.size-lg { width: 60px !important; height: 60px !important; }
    .cloud-photo.size-md { width: 50px !important; height: 50px !important; }
    .cloud-photo.size-sm { width: 40px !important; height: 40px !important; }
    .cloud-photo.size-xs { width: 30px !important; height: 30px !important; }
}

@media (max-width: 480px) {
    .organic-wordcloud {
        min-height: 350px;
        height: 350px;
        margin: 1rem 0;
    }
    
    .cloud-photo.size-xl { width: 60px !important; height: 60px !important; }
    .cloud-photo.size-lg { width: 50px !important; height: 50px !important; }
    .cloud-photo.size-md { width: 45px !important; height: 45px !important; }
    .cloud-photo.size-sm { width: 35px !important; height: 35px !important; }
    .cloud-photo.size-xs { width: 25px !important; height: 25px !important; }
}
/* Pleine largeur au lieu de 85% */
    max-width: none; /* Supprime la limitation max-width */
    min-height: 600px; /* Hauteur augmentée */
    height: 600px; /* Hauteur fixe plus grande */
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    overflow: visible;
    margin: 2rem 0; /* Supprime le centrage auto */
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
    padding: 2rem; /* Padding augmenté */
    z-index: 1;
}

/* Stats summary - Ajustement pour pleine largeur */
.stats-summary {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.stat-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    min-width: 120px;
    transition: all 0.3s ease;
}

.stat-card:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: white;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card.level-1 {
    border-color: rgba(76, 175, 80, 0.5);
    background: rgba(76, 175, 80, 0.1);
}

.stat-card.level-2 {
    border-color: rgba(255, 152, 0, 0.5);
    background: rgba(255, 152, 0, 0.1);
}

.stat-card.level-3 {
    border-color: rgba(33, 150, 243, 0.5);
    background: rgba(33, 150, 243, 0.1);
}

.stat-card.total {
    border-color: rgba(156, 39, 176, 0.5);
    background: rgba(156, 39, 176, 0.1);
}

/* Ajuster les autres sections pour cohérence */
.events-section,
.publications-section,
.announcements-section {
    grid-column: 1 / -1; /* Toutes les sections en pleine largeur */
    margin-bottom: 2rem;
}

/* Pleine largeur */
    max-width: none; /* Supprime les limitations */
    margin: 2rem 0; /* Supprime le centrage auto */
}

/* Responsive - WordCloud pleine largeur */
@media (max-width: 1200px) {
    .organic-wordcloud {
        min-height: 550px;
        height: 550px;
        padding: 1.5rem;
    }
    
    .stats-summary {
        gap: 1.5rem;
    }
    
    .stat-card {
        min-width: 100px;
        padding: 1.2rem;
    }
}

@media (max-width: 768px) {
    .organic-wordcloud {
        min-height: 450px;
        height: 450px;
        padding: 1rem;
        border-radius: 12px;
    }
    
    .stats-summary {
        gap: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .stat-card {
        min-width: 80px;
        padding: 1rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .organic-wordcloud {
        min-height: 350px;
        height: 350px;
        margin: 1rem 0;
    }
    
    .stats-summary {
        gap: 0.75rem;
    }
    
    .stat-card {
        min-width: 70px;
        padding: 0.75rem;
    }
    
    .stat-number {
        font-size: 1.2rem;
    }
}

/* Grid layout ajusté */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr; /* Une seule colonne */
    gap: 0; /* Pas de gap entre sections */
    max-width: 1400px; /* Largeur maximale augmentée */
    margin: 0 auto;
    padding: 0 1rem;
}

/* Section headers - Ajustement pour pleine largeur */
.section-header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 0 2rem;
}

.section-header h2 {
    font-size: 2.2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.section-header p {
    font-size: 1.1rem;
    color: #7f8c8d;
    margin: 0;
}

/* Loading state - Ajusté pour pleine largeur */
.cloud-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.2rem;
    text-align: center;
}

/* WordCloud - CONTAINMENT ABSOLU */
.organic-wordcloud {
    position: relative;
    width: 100%;
    max-width: none;
    min-height: 700px;
    height: 700px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    overflow: hidden !important; /* ABSOLU - Rien ne sort */
    margin: 2rem 0;
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
    padding: 2rem;
    z-index: 1;
    /* Containment CSS natif */
    contain: layout style paint size;
    /* Créer un contexte d'empilement strict */
    isolation: isolate;
}

/* Zone de placement stricte */
.organic-wordcloud::before {
    content: "";
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    bottom: 20px;
    border: 2px dashed rgba(255,255,255,0.1);
    border-radius: 10px;
    pointer-events: none;
    z-index: 1;
}

/* Photos - STRICTEMENT contenues */
.cloud-photo {
    position: absolute !important;
    cursor: pointer;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.12);
    border: 2px solid rgba(255,255,255,0.8);
    z-index: 10;
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
    /* CONTRAINTES ABSOLUES */
    max-width: 80px !important;
    max-height: 80px !important;
    /* Empêcher tout débordement */
    contain: layout style paint size;
    /* Forcer dans les limites du parent */
    clip-path: inset(0);
}

/* Hover CONTRÔLÉ */
.cloud-photo:hover {
    transform: scale(1.05) !important; /* Scale réduit */
    z-index: 100 !important;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    border-color: #fff;
    /* Maintenir les contraintes au hover */
    max-width: 80px !important;
    max-height: 80px !important;
}

/* Tailles STRICTEMENT contrôlées */
.cloud-photo.size-xl {
    width: 80px !important;
    height: 80px !important;
    z-index: 60;
}

.cloud-photo.size-lg {
    width: 70px !important;
    height: 70px !important;
    z-index: 50;
}

.cloud-photo.size-md {
    width: 60px !important;
    height: 60px !important;
    z-index: 30;
}

.cloud-photo.size-sm {
    width: 50px !important;
    height: 50px !important;
    z-index: 20;
}

.cloud-photo.size-xs {
    width: 40px !important;
    height: 40px !important;
    z-index: 15;
}

/* Niveaux avec priorité visuelle */
.cloud-photo.level-1 {
    z-index: 80 !important;
    border-color: #4CAF50 !important;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3) !important;
}

.cloud-photo.level-2 {
    z-index: 40 !important;
    border-color: #FF9800 !important;
    box-shadow: 0 3px 12px rgba(255, 152, 0, 0.25) !important;
}

.cloud-photo.level-3 {
    z-index: 20 !important;
    border-color: #2196F3 !important;
    box-shadow: 0 2px 10px rgba(33, 150, 243, 0.2) !important;
}

/* Images STRICTEMENT contenues */
.cloud-photo img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    border-radius: 10px;
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
    /* Empêcher tout débordement de l'image */
    max-width: 100% !important;
    max-height: 100% !important;
}

/* Badge niveau */
.cloud-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    font-weight: bold;
    color: white;
    border: 1px solid white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    z-index: 5;
    opacity: 1 !important;
    visibility: visible !important;
}

.cloud-badge.level-1 { background: #4CAF50 !important; z-index: 85 !important; }
.cloud-badge.level-2 { background: #FF9800 !important; z-index: 45 !important; }
.cloud-badge.level-3 { background: #2196F3 !important; z-index: 25 !important; }

/* Nom au hover */
.cloud-name {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    font-size: 0.65rem;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 5;
    /* Empêcher le débordement du nom */
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cloud-photo:hover .cloud-name {
    opacity: 1 !important;
    z-index: 105 !important;
}

/* Responsive avec containment */
@media (max-width: 1200px) {
    .organic-wordcloud {
        min-height: 600px;
        height: 600px;
        padding: 1.5rem;
    }
    
    .cloud-photo.size-xl { width: 70px !important; height: 70px !important; max-width: 70px !important; max-height: 70px !important; }
    .cloud-photo.size-lg { width: 60px !important; height: 60px !important; max-width: 60px !important; max-height: 60px !important; }
    .cloud-photo.size-md { width: 50px !important; height: 50px !important; max-width: 50px !important; max-height: 50px !important; }
    .cloud-photo.size-sm { width: 45px !important; height: 45px !important; max-width: 45px !important; max-height: 45px !important; }
    .cloud-photo.size-xs { width: 35px !important; height: 35px !important; max-width: 35px !important; max-height: 35px !important; }
}

@media (max-width: 768px) {
    .organic-wordcloud {
        min-height: 500px;
        height: 500px;
        padding: 1rem;
    }
    
    .cloud-photo.size-xl { width: 60px !important; height: 60px !important; max-width: 60px !important; max-height: 60px !important; }
    .cloud-photo.size-lg { width: 50px !important; height: 50px !important; max-width: 50px !important; max-height: 50px !important; }
    .cloud-photo.size-md { width: 45px !important; height: 45px !important; max-width: 45px !important; max-height: 45px !important; }
    .cloud-photo.size-sm { width: 40px !important; height: 40px !important; max-width: 40px !important; max-height: 40px !important; }
    .cloud-photo.size-xs { width: 30px !important; height: 30px !important; max-width: 30px !important; max-height: 30px !important; }
}

@media (max-width: 480px) {
    .organic-wordcloud {
        min-height: 400px;
        height: 400px;
    }
    
    .cloud-photo.size-xl { width: 50px !important; height: 50px !important; max-width: 50px !important; max-height: 50px !important; }
    .cloud-photo.size-lg { width: 45px !important; height: 45px !important; max-width: 45px !important; max-height: 45px !important; }
    .cloud-photo.size-md { width: 40px !important; height: 40px !important; max-width: 40px !important; max-height: 40px !important; }
    .cloud-photo.size-sm { width: 35px !important; height: 35px !important; max-width: 35px !important; max-height: 35px !important; }
    .cloud-photo.size-xs { width: 25px !important; height: 25px !important; max-width: 25px !important; max-height: 25px !important; }
}

/* Loading state */
.cloud-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    text-align: center;
    z-index: 1000;
}

/* Section événements - Style publications */
.events-section {
    grid-column: 1 / -1;
    margin-bottom: 2rem;
}

/* Container événements - Style grille comme publications */
.events-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    width: 100%;
    max-width: none;
    margin: 2rem 0;
}

/* Cartes événements - Style identique aux publications */
.event-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: auto;
}

.event-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* Titre événement - Style card-title */
.event-card-title {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: #333;
    line-height: 1.3;
}

/* Date événement - Style card-author */
.event-card-date {
    color: #667eea;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Description événement - Style card-description */
.event-card-description {
    color: #666;
    line-height: 1.5;
    margin-bottom: 1rem;
    flex-grow: 1;
}

/* Métadonnées événement */
.event-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 0.5rem;
    border-top: 1px solid #f0f0f0;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Coût événement - Style badge */
.event-card-cost {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.event-card-cost::before {
    content: "💰";
    font-size: 0.7rem;
}

/* Intervenants événement */
.event-card-speakers {
    color: #888;
    font-size: 0.85rem;
    font-style: italic;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.event-card-speakers::before {
    content: "👥";
    font-size: 0.8rem;
}

/* État vide - Style cohérent */
.events-empty {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    color: #666;
    text-align: center;
}

.events-empty i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
    color: #667eea;
}

.events-empty h3 {
    margin: 0 0 0.5rem 0;
    color: #333;
    font-size: 1.3rem;
}

.events-empty p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.5;
}

/* Responsive - Style publications */
@media (max-width: 768px) {
    .events-container {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .event-card {
        padding: 0.75rem;
    }
    
    .event-card-title {
        font-size: 1rem;
    }
    
    .event-card-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
}

@media (max-width: 480px) {
    .event-card {
        padding: 0.5rem;
    }
    
    .event-card-title {
        font-size: 0.95rem;
    }
    
    .event-card-date {
        font-size: 0.8rem;
    }
    
    .event-card-description {
        font-size: 0.9rem;
    }
}

/* Supprimer les anciens styles événements */
.events-fullcard,
.events-list,
.event-item,
.event-date,
.event-details,
.event-meta,
.event-cost,
.event-speakers {
    display: none !important;
}
