
/* Modal des participants */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e5e7eb;
    background: #f8fafc;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
}

.modal-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #6b7280;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.2s;
}

.modal-close:hover {
    background: #e5e7eb;
    color: #374151;
}

.modal-body {
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
}

/* Liste des participants */
.participants-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.participant-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f9fafb;
    transition: all 0.2s;
}

.participant-item:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.participant-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.participant-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.participant-name {
    margin: 0 0 5px 0;
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 8px;
}

.premium-badge {
    color: #f59e0b;
    font-size: 14px;
}

.participant-location {
    margin: 0;
    font-size: 14px;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 5px;
}

.participant-message {
    margin: 5px 0 0 0;
    font-size: 13px;
    color: #4b5563;
    font-style: italic;
    display: flex;
    align-items: flex-start;
    gap: 5px;
}

.participant-message i {
    color: #6b7280;
    margin-top: 2px;
}

.participant-actions {
    flex-shrink: 0;
    display: flex;
    gap: 8px;
}

.participant-profile-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 12px;
    background: #3b82f6;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.participant-profile-btn:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

.participant-remove-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 12px;
    background: #dc2626;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

.participant-remove-btn:hover {
    background: #b91c1c;
    transform: translateY(-1px);
}

/* États de chargement et d'erreur */
.loading, .no-participants, .error {
    text-align: center;
    padding: 40px 20px;
    color: #6b7280;
    font-size: 16px;
}

.error {
    color: #dc2626;
}

/* Affichage du nombre de participants dans les métadonnées */
.annonce-detail-participants {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #3b82f6;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
    font-size: 14px;
}

.annonce-detail-participants:hover {
    background: #eff6ff;
}

/* Styles responsives pour mobile */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        max-width: none;
        margin: 10px;
        max-height: 90vh;
    }
    
    .modal-header {
        padding: 15px;
    }
    
    .modal-header h3 {
        font-size: 16px;
    }
    
    .modal-close {
        font-size: 18px;
        padding: 8px;
    }
    
    .modal-body {
        padding: 15px;
        max-height: 70vh;
    }
    
    .participant-item {
        padding: 10px;
        gap: 10px;
        flex-direction: row;
        align-items: center;
    }
    
    .participant-avatar {
        width: 35px;
        height: 35px;
    }
    
    .participant-info {
        flex: 1;
        min-width: 0;
        text-align: left;
    }
    
    .participant-name {
        font-size: 13px;
        justify-content: flex-start;
        margin-bottom: 2px;
    }
    
    .premium-badge {
        font-size: 10px;
    }
    
    .participant-location {
        font-size: 11px;
        justify-content: flex-start;
        margin-bottom: 3px;
    }
    
    .participant-message {
        font-size: 10px;
        justify-content: flex-start;
        text-align: left;
        margin-bottom: 5px;
    }
    
    .participant-actions {
        flex-shrink: 0;
        gap: 6px;
    }
    
    .participant-profile-btn,
    .participant-remove-btn {
        padding: 6px 10px;
        font-size: 11px;
        min-width: 60px;
        justify-content: center;
    }
    
    .participant-profile-btn i,
    .participant-remove-btn i {
        font-size: 10px;
    }
    
    .loading, .no-participants, .error {
        font-size: 14px;
        padding: 30px 15px;
    }
}

/* Styles pour très petits écrans */
@media (max-width: 480px) {
    .modal-content {
        width: 98%;
        margin: 5px;
        border-radius: 8px;
    }
    
    .modal-header {
        padding: 12px;
    }
    
    .modal-header h3 {
        font-size: 15px;
    }
    
    .modal-body {
        padding: 12px;
    }
    
    .participant-item {
        padding: 8px;
        gap: 8px;
    }
    
    .participant-avatar {
        width: 30px;
        height: 30px;
    }
    
    .participant-name {
        font-size: 12px;
    }
    
    .participant-location {
        font-size: 10px;
    }
    
    .participant-message {
        font-size: 9px;
    }
    
    .participant-actions {
        gap: 4px;
    }
    
    .participant-profile-btn,
    .participant-remove-btn {
        padding: 5px 8px;
        font-size: 10px;
        min-width: 50px;
    }
    
    .participant-profile-btn i,
    .participant-remove-btn i {
        font-size: 9px;
    }
}

/* Bloc d'informations sur les participants dans la sidebar */
.annonce-detail-participants-card {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.annonce-detail-participants-title {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 8px;
}

.annonce-detail-participants-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.annonce-detail-participants-count {
    text-align: center;
    padding: 15px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

.participants-number {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: #3b82f6;
    line-height: 1;
}

.participants-text {
    display: block;
    font-size: 14px;
    color: #6b7280;
    margin-top: 5px;
}

/* Liste des participants dans la sidebar */
.annonce-detail-participants-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.participant-preview-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    transition: all 0.2s;
}

.participant-preview-item:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

.participant-preview-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.participant-preview-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.participant-preview-info {
    flex: 1;
    min-width: 0;
}

.participant-preview-name {
    margin: 0 0 3px 0;
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 6px;
    line-height: 1.2;
}

.premium-badge-small {
    color: #f59e0b;
    font-size: 12px;
}

.participant-preview-location {
    margin: 0;
    font-size: 12px;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* État sans participants */
.annonce-detail-no-participants {
    text-align: center;
    padding: 30px 20px;
    color: #6b7280;
}

.annonce-detail-no-participants i {
    font-size: 24px;
    margin-bottom: 10px;
    display: block;
}

.annonce-detail-no-participants p {
    margin: 0;
    font-size: 14px;
}

/* Boutons */
.annonce-detail-participants-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.annonce-detail-participants-btn:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

.annonce-detail-participants-more-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px;
    background: #10b981;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.annonce-detail-participants-more-btn:hover {
    background: #059669;
    transform: translateY(-1px);
}

/* Bouton pour voir tous les participants dans le modal */
.participants-more {
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid #e5e7eb;
    margin-top: 15px;
}

.participants-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.participants-more-btn:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

/* Styles pour les messages de participation */
.participant-preview-message {
    font-size: 9px;
    color: #666;
    margin-top: 2px;
    font-style: italic;
    line-height: 1.1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 180px;
}

.participant-preview-message i {
    margin-right: 2px;
    color: #007bff;
    font-size: 8px;
}

/* Ajuster l'espacement pour les messages */
.participant-preview-info {
    flex: 1;
    min-width: 0; /* Pour permettre le text-overflow */
}

/* Styles pour le modal de participation */
.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 15px;
}

.modal-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.modal-btn.primary {
    background: #3b82f6;
    color: white;
}

.modal-btn.primary:hover {
    background: #2563eb;
}

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

.modal-btn.secondary:hover {
    background: #4b5563;
}

/* Styles pour les boutons de participation (simples) */
[data-response-type="participation"].participating {
    background: #10b981 !important;
    color: white !important;
}

[data-response-type="participation"].participating:hover {
    background: #059669 !important;
}

/* Styles pour le modal de participation */
#participationModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

#participationModal .modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

#participationModal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e5e7eb;
    background: #f8fafc;
}

#participationModal .modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
}

#participationModal .modal-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #6b7280;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.2s;
}

#participationModal .modal-close:hover {
    background: #e5e7eb;
    color: #374151;
}

#participationModal .modal-body {
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
}

/* Responsive pour le modal de participation */
@media (max-width: 768px) {
    #participationModal .modal-content {
        width: 95%;
        margin: 20px;
    }
    
    #participationModal .modal-header {
        padding: 15px;
    }
    
    #participationModal .modal-body {
        padding: 15px;
    }
}
